Browse Source

Merge branch 'main' into feature/add-tags-to-account-detail-dialog

pull/7460/head
Thomas Kaul 1 month ago
committed by GitHub
parent
commit
a42e403538
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 13
      apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts
  3. 41
      apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html

1
CHANGELOG.md

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Added an overview tab to the account detail dialog
- Added the tags (read-only) to the account detail dialog (experimental) - Added the tags (read-only) to the account detail dialog (experimental)
### Changed ### Changed

13
apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts

@ -51,6 +51,7 @@ import { addIcons } from 'ionicons';
import { import {
albumsOutline, albumsOutline,
cashOutline, cashOutline,
readerOutline,
swapVerticalOutline swapVerticalOutline
} from 'ionicons/icons'; } from 'ionicons/icons';
import { isNumber } from 'lodash'; import { isNumber } from 'lodash';
@ -101,7 +102,6 @@ export class GfAccountDetailDialogComponent implements OnInit {
protected holdings: PortfolioPosition[]; protected holdings: PortfolioPosition[];
protected interestInBaseCurrency: number; protected interestInBaseCurrency: number;
protected interestInBaseCurrencyPrecision = 2; protected interestInBaseCurrencyPrecision = 2;
protected isLoadingActivities: boolean;
protected isLoadingChart: boolean; protected isLoadingChart: boolean;
protected name: string | null; protected name: string | null;
protected pageIndex = 0; protected pageIndex = 0;
@ -153,7 +153,12 @@ export class GfAccountDetailDialogComponent implements OnInit {
} }
}); });
addIcons({ albumsOutline, cashOutline, swapVerticalOutline }); addIcons({
albumsOutline,
cashOutline,
readerOutline,
swapVerticalOutline
});
} }
public ngOnInit() { public ngOnInit() {
@ -303,8 +308,6 @@ export class GfAccountDetailDialogComponent implements OnInit {
} }
private fetchActivities() { private fetchActivities() {
this.isLoadingActivities = true;
this.dataService this.dataService
.fetchActivities({ .fetchActivities({
filters: [{ id: this.data.accountId, type: 'ACCOUNT' }], filters: [{ id: this.data.accountId, type: 'ACCOUNT' }],
@ -318,8 +321,6 @@ export class GfAccountDetailDialogComponent implements OnInit {
this.dataSource = new MatTableDataSource(activities); this.dataSource = new MatTableDataSource(activities);
this.totalItems = count; this.totalItems = count;
this.isLoadingActivities = false;
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
}); });
} }

41
apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html

@ -30,7 +30,18 @@
/> />
</div> </div>
<div class="mb-3 row"> <mat-tab-group
animationDuration="0ms"
class="mb-4"
[mat-stretch-tabs]="false"
>
<mat-tab>
<ng-template mat-tab-label>
<ion-icon name="reader-outline" />
<div class="d-none d-sm-block ml-2" i18n>Overview</div>
</ng-template>
<div class="container mt-3 p-0">
<div class="row w-100">
<div class="col-6 mb-3"> <div class="col-6 mb-3">
<gf-value <gf-value
i18n i18n
@ -80,20 +91,30 @@
> >
</div> </div>
<div class="col-6 mb-3"> <div class="col-6 mb-3">
<gf-value i18n size="medium" [value]="activitiesCount" <gf-value
>Activities</gf-value size="medium"
[locale]="user?.settings?.locale"
[value]="activitiesCount"
> >
@if (activitiesCount === 1) {
<ng-container i18n>Activity</ng-container>
} @else {
<ng-container i18n>Activities</ng-container>
}
</gf-value>
</div> </div>
<div class="col-6 mb-3"> <div class="col-6 mb-3">
<gf-value i18n size="medium" [value]="platformName">Platform</gf-value> <gf-value
i18n
size="medium"
[locale]="user?.settings?.locale"
[value]="platformName"
>Platform</gf-value
>
</div> </div>
</div> </div>
</div>
<mat-tab-group </mat-tab>
animationDuration="0ms"
[class.d-none]="isLoadingActivities"
[mat-stretch-tabs]="false"
>
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
<ion-icon name="albums-outline" /> <ion-icon name="albums-outline" />

Loading…
Cancel
Save