Browse Source

Merge branch 'main' into migrate-activities-page-component-to-onpush

pull/7248/head
Thomas Kaul 6 days ago
committed by GitHub
parent
commit
cab6a10309
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      CHANGELOG.md
  2. 10
      apps/client/src/app/components/admin-market-data/admin-market-data.component.ts
  3. 8
      apps/client/src/app/components/admin-market-data/admin-market-data.html
  4. 9
      apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts

2
CHANGELOG.md

@ -14,8 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Improved the user account deletion flow in the user settings of the user account page
- Improved the date formatting of the first activity in the historical market data table of the admin control panel
- Set the change detection strategy to `OnPush` in the activities page
- Set the change detection strategy to `OnPush` in the allocations page
- Set the change detection strategy to `OnPush` in the analysis page
- Set the change detection strategy to `OnPush` in the portfolio holdings page
- Set the change detection strategy to `OnPush` in the activities page
- Set the change detection strategy to `OnPush` in the _FIRE_ page

10
apps/client/src/app/components/admin-market-data/admin-market-data.component.ts

@ -4,10 +4,7 @@ import {
DEFAULT_LOCALE,
DEFAULT_PAGE_SIZE
} from '@ghostfolio/common/config';
import {
canDeleteAssetProfile,
getDateFormatString
} from '@ghostfolio/common/helper';
import { canDeleteAssetProfile } from '@ghostfolio/common/helper';
import {
AssetProfileIdentifier,
AssetProfileItem,
@ -153,7 +150,6 @@ export class GfAdminMarketDataComponent implements AfterViewInit, OnInit {
];
protected readonly canDeleteAssetProfile = canDeleteAssetProfile;
protected dataSource = new MatTableDataSource<AssetProfileItem>();
protected defaultDateFormat: string;
protected readonly displayedColumns: string[] = [];
protected readonly filters$ = new Subject<Filter[]>();
protected isLoading = true;
@ -236,10 +232,6 @@ export class GfAdminMarketDataComponent implements AfterViewInit, OnInit {
.subscribe((state) => {
if (state?.user) {
this.user = state.user;
this.defaultDateFormat = getDateFormatString(
this.user.settings.locale
);
}
});

8
apps/client/src/app/components/admin-market-data/admin-market-data.html

@ -147,7 +147,13 @@
<ng-container i18n>First Activity</ng-container>
</th>
<td *matCellDef="let element" class="px-1" mat-cell>
{{ (element.date | date: defaultDateFormat) ?? '' }}
@if (element.date) {
<gf-value
[isDate]="true"
[locale]="user?.settings?.locale"
[value]="element.date"
/>
}
</td>
</ng-container>

9
apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts

@ -25,6 +25,7 @@ import { GfValueComponent } from '@ghostfolio/ui/value';
import { Clipboard } from '@angular/cdk/clipboard';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
computed,
@ -51,6 +52,7 @@ import { DeviceDetectorService } from 'ngx-device-detector';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
GfBenchmarkComparatorComponent,
GfInvestmentChartComponent,
@ -148,6 +150,8 @@ export class GfAnalysisPageComponent implements OnInit {
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((impersonationId) => {
this.hasImpersonationId = !!impersonationId;
this.changeDetectorRef.markForCheck();
});
this.userService.stateChanged
@ -167,6 +171,8 @@ export class GfAnalysisPageComponent implements OnInit {
this.update();
}
this.changeDetectorRef.markForCheck();
});
}
@ -229,6 +235,8 @@ export class GfAnalysisPageComponent implements OnInit {
} else if (mode === 'portfolio') {
this.isLoadingPortfolioPrompt = false;
}
this.changeDetectorRef.markForCheck();
});
}
@ -382,6 +390,7 @@ export class GfAnalysisPageComponent implements OnInit {
});
this.fetchDividendsAndInvestments();
this.changeDetectorRef.markForCheck();
}

Loading…
Cancel
Save