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 an overview tab to the account detail dialog
- Added the tags (read-only) to the account detail dialog (experimental)
### Changed

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

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

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

@ -30,7 +30,18 @@
/>
</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">
<gf-value
i18n
@ -80,20 +91,30 @@
>
</div>
<div class="col-6 mb-3">
<gf-value i18n size="medium" [value]="activitiesCount"
>Activities</gf-value
<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 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>
<mat-tab-group
animationDuration="0ms"
[class.d-none]="isLoadingActivities"
[mat-stretch-tabs]="false"
>
</div>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<ion-icon name="albums-outline" />

Loading…
Cancel
Save