Browse Source
Merge branch 'main' into bugfix/fix-division-by-zero-error-in-cash-positions-calculation
pull/1462/head
Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
31 additions and
7 deletions
-
CHANGELOG.md
-
apps/client/src/app/app.module.ts
-
apps/client/src/app/components/accounts-table/accounts-table.component.html
-
apps/client/src/app/components/accounts-table/accounts-table.component.ts
-
apps/client/src/app/components/accounts-table/accounts-table.module.ts
-
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
-
apps/client/src/app/pages/portfolio/allocations/allocations-page.module.ts
|
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
|
|
- Added support for sorting in the accounts table |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Improved the _Activities_ tab icon |
|
|
@ -15,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the activities sorting in the position detail dialog |
|
|
|
- Fixed a division by zero error in the cash positions calculation |
|
|
|
|
|
|
|
## 1.213.0 - 14.11.2022 |
|
|
|
|
|
@ -10,6 +10,7 @@ import { |
|
|
|
MatNativeDateModule |
|
|
|
} from '@angular/material/core'; |
|
|
|
import { MatSnackBarModule } from '@angular/material/snack-bar'; |
|
|
|
import { MatTooltipModule } from '@angular/material/tooltip'; |
|
|
|
import { BrowserModule } from '@angular/platform-browser'; |
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
|
|
|
import { MaterialCssVarsModule } from 'angular-material-css-vars'; |
|
|
@ -50,6 +51,7 @@ export function NgxStripeFactory(): string { |
|
|
|
}), |
|
|
|
MatNativeDateModule, |
|
|
|
MatSnackBarModule, |
|
|
|
MatTooltipModule, |
|
|
|
NgxSkeletonLoaderModule, |
|
|
|
NgxStripeModule.forRoot(environment.stripePublicKey), |
|
|
|
ServiceWorkerModule.register('ngsw-worker.js', { |
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
<table class="gf-table w-100" mat-table [dataSource]="dataSource"> |
|
|
|
<table class="gf-table w-100" mat-table matSort [dataSource]="dataSource"> |
|
|
|
<ng-container matColumnDef="status"> |
|
|
|
<th |
|
|
|
*matHeaderCellDef |
|
|
@ -37,7 +37,12 @@ |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container matColumnDef="currency"> |
|
|
|
<th *matHeaderCellDef class="d-none d-lg-table-cell px-1" mat-header-cell> |
|
|
|
<th |
|
|
|
*matHeaderCellDef |
|
|
|
class="d-none d-lg-table-cell px-1" |
|
|
|
mat-header-cell |
|
|
|
mat-sort-header |
|
|
|
> |
|
|
|
<ng-container i18n>Currency</ng-container> |
|
|
|
</th> |
|
|
|
<td *matCellDef="let element" class="d-none d-lg-table-cell px-1" mat-cell> |
|
|
@ -88,8 +93,9 @@ |
|
|
|
<ng-container matColumnDef="balance"> |
|
|
|
<th |
|
|
|
*matHeaderCellDef |
|
|
|
class="d-none d-lg-table-cell px-1 text-right" |
|
|
|
class="d-none d-lg-table-cell justify-content-end px-1" |
|
|
|
mat-header-cell |
|
|
|
mat-sort-header |
|
|
|
> |
|
|
|
<ng-container i18n>Cash Balance</ng-container> |
|
|
|
</th> |
|
|
@ -122,8 +128,9 @@ |
|
|
|
<ng-container matColumnDef="value"> |
|
|
|
<th |
|
|
|
*matHeaderCellDef |
|
|
|
class="d-none d-lg-table-cell px-1 text-right" |
|
|
|
class="d-none d-lg-table-cell justify-content-end px-1" |
|
|
|
mat-header-cell |
|
|
|
mat-sort-header |
|
|
|
> |
|
|
|
<ng-container i18n>Value</ng-container> |
|
|
|
</th> |
|
|
@ -158,6 +165,7 @@ |
|
|
|
*matHeaderCellDef |
|
|
|
class="d-lg-none d-xl-none px-1 text-right" |
|
|
|
mat-header-cell |
|
|
|
mat-sort-header |
|
|
|
> |
|
|
|
<ng-container i18n>Value</ng-container> |
|
|
|
</th> |
|
|
|
|
|
@ -6,8 +6,10 @@ import { |
|
|
|
OnChanges, |
|
|
|
OnDestroy, |
|
|
|
OnInit, |
|
|
|
Output |
|
|
|
Output, |
|
|
|
ViewChild |
|
|
|
} from '@angular/core'; |
|
|
|
import { MatSort } from '@angular/material/sort'; |
|
|
|
import { MatTableDataSource } from '@angular/material/table'; |
|
|
|
import { Router } from '@angular/router'; |
|
|
|
import { Account as AccountModel } from '@prisma/client'; |
|
|
@ -32,6 +34,8 @@ export class AccountsTableComponent implements OnChanges, OnDestroy, OnInit { |
|
|
|
@Output() accountDeleted = new EventEmitter<string>(); |
|
|
|
@Output() accountToUpdate = new EventEmitter<AccountModel>(); |
|
|
|
|
|
|
|
@ViewChild(MatSort) sort: MatSort; |
|
|
|
|
|
|
|
public dataSource: MatTableDataSource<AccountModel> = |
|
|
|
new MatTableDataSource(); |
|
|
|
public displayedColumns = []; |
|
|
@ -64,6 +68,7 @@ export class AccountsTableComponent implements OnChanges, OnDestroy, OnInit { |
|
|
|
|
|
|
|
if (this.accounts) { |
|
|
|
this.dataSource = new MatTableDataSource(this.accounts); |
|
|
|
this.dataSource.sort = this.sort; |
|
|
|
|
|
|
|
this.isLoading = false; |
|
|
|
} |
|
|
|
|
|
@ -3,6 +3,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; |
|
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
|
import { MatInputModule } from '@angular/material/input'; |
|
|
|
import { MatMenuModule } from '@angular/material/menu'; |
|
|
|
import { MatSortModule } from '@angular/material/sort'; |
|
|
|
import { MatTableModule } from '@angular/material/table'; |
|
|
|
import { RouterModule } from '@angular/router'; |
|
|
|
import { GfSymbolIconModule } from '@ghostfolio/client/components/symbol-icon/symbol-icon.module'; |
|
|
@ -21,6 +22,7 @@ import { AccountsTableComponent } from './accounts-table.component'; |
|
|
|
MatButtonModule, |
|
|
|
MatInputModule, |
|
|
|
MatMenuModule, |
|
|
|
MatSortModule, |
|
|
|
MatTableModule, |
|
|
|
NgxSkeletonLoaderModule, |
|
|
|
RouterModule |
|
|
|
|
|
@ -213,7 +213,7 @@ |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div *ngIf="orders?.length > 0" class="row"> |
|
|
|
<div class="row" [ngClass]="{ 'd-none': !orders?.length }"> |
|
|
|
<div class="col mb-3"> |
|
|
|
<div class="h5 mb-0" i18n>Activities</div> |
|
|
|
<gf-activities-table |
|
|
@ -221,7 +221,7 @@ |
|
|
|
[baseCurrency]="data.baseCurrency" |
|
|
|
[deviceType]="data.deviceType" |
|
|
|
[hasPermissionToCreateActivity]="false" |
|
|
|
[hasPermissionToExportActivities]="!hasImpersonationId" |
|
|
|
[hasPermissionToExportActivities]="true" |
|
|
|
[hasPermissionToFilter]="false" |
|
|
|
[hasPermissionToImportActivities]="false" |
|
|
|
[hasPermissionToOpenDetails]="false" |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import { CommonModule } from '@angular/common'; |
|
|
|
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; |
|
|
|
import { MatCardModule } from '@angular/material/card'; |
|
|
|
import { MatDialogModule } from '@angular/material/dialog'; |
|
|
|
import { MatProgressBarModule } from '@angular/material/progress-bar'; |
|
|
|
import { GfToggleModule } from '@ghostfolio/client/components/toggle/toggle.module'; |
|
|
|
import { GfWorldMapChartModule } from '@ghostfolio/client/components/world-map-chart/world-map-chart.module'; |
|
|
@ -24,6 +25,7 @@ import { AllocationsPageComponent } from './allocations-page.component'; |
|
|
|
GfWorldMapChartModule, |
|
|
|
GfValueModule, |
|
|
|
MatCardModule, |
|
|
|
MatDialogModule, |
|
|
|
MatProgressBarModule |
|
|
|
], |
|
|
|
schemas: [CUSTOM_ELEMENTS_SCHEMA] |
|
|
|