Browse Source

Merge 8ad7e1c297 into c2cb508f22

pull/8241/merge
Mister_Ideas 1 day ago
committed by GitHub
parent
commit
b1afa6cb9b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 4
      apps/api/src/app/user/user.service.ts
  3. 4
      apps/client/src/app/components/home-holdings/home-holdings.component.ts
  4. 4
      apps/client/src/app/components/home-overview/home-overview.component.ts
  5. 12
      apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts
  6. 1
      libs/common/src/lib/config.ts

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Changed the default date range of users without a stored date range from `max` to `ytd`
- Improved the market price in the benchmark detail dialog by adding the currency and reducing the precision on mobile
- Improved the style of the close button in the dialog footer component
- Improved the style of the close button in the dialog header component

4
apps/api/src/app/user/user.service.ts

@ -12,7 +12,7 @@ import { PropertyService } from '@ghostfolio/api/services/property/property.serv
import { TagService } from '@ghostfolio/api/services/tag/tag.service';
import {
DEFAULT_CURRENCY,
DEFAULT_DATE_RANGE,
DEFAULT_USER_DATE_RANGE,
DEFAULT_LOCALE,
DELETE_OWN_USER_PERIOD,
PROPERTY_API_KEY_GHOSTFOLIO,
@ -362,7 +362,7 @@ export class UserService {
(user.settings.settings as UserSettings).viewMode === 'ZEN'
? 'max'
: ((user.settings.settings as UserSettings)?.dateRange ??
DEFAULT_DATE_RANGE);
DEFAULT_USER_DATE_RANGE);
// Set default value for performance calculation type
if (!(user.settings.settings as UserSettings)?.performanceCalculationType) {

4
apps/client/src/app/components/home-holdings/home-holdings.component.ts

@ -1,7 +1,7 @@
import { UserService } from '@ghostfolio/client/services/user/user.service';
import {
DEFAULT_CURRENCY,
DEFAULT_DATE_RANGE,
DEFAULT_USER_DATE_RANGE,
DEFAULT_LOCALE
} from '@ghostfolio/common/config';
import {
@ -66,7 +66,7 @@ export class GfHomeHoldingsComponent implements OnInit {
});
protected readonly dateRange = computed(() => {
return this.user()?.settings?.dateRange ?? DEFAULT_DATE_RANGE;
return this.user()?.settings?.dateRange ?? DEFAULT_USER_DATE_RANGE;
});
protected readonly deviceType = computed(() => {

4
apps/client/src/app/components/home-overview/home-overview.component.ts

@ -4,7 +4,7 @@ import { ImpersonationStorageService } from '@ghostfolio/client/services/imperso
import { UserService } from '@ghostfolio/client/services/user/user.service';
import {
DEFAULT_CURRENCY,
DEFAULT_DATE_RANGE,
DEFAULT_USER_DATE_RANGE,
DEFAULT_LOCALE,
NUMERICAL_PRECISION_THRESHOLD_6_FIGURES
} from '@ghostfolio/common/config';
@ -203,7 +203,7 @@ export class GfHomeOverviewComponent implements OnInit {
this.dataService
.fetchPortfolioPerformance({
range: userSettings?.dateRange ?? DEFAULT_DATE_RANGE
range: userSettings?.dateRange ?? DEFAULT_USER_DATE_RANGE
})
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(({ chart, errors, performance }) => {

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

@ -1,7 +1,7 @@
import { GfBenchmarkComparatorComponent } from '@ghostfolio/client/components/benchmark-comparator/benchmark-comparator.component';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import {
DEFAULT_DATE_RANGE,
DEFAULT_USER_DATE_RANGE,
NUMERICAL_PRECISION_THRESHOLD_6_FIGURES
} from '@ghostfolio/common/config';
import { SubscriptionType } from '@ghostfolio/common/enums';
@ -249,12 +249,12 @@ export class GfAnalysisPageComponent implements OnInit {
dividends: this.dataService.fetchDividends({
filters: this.userService.getFilters(),
groupBy: this.mode(),
range: this.user?.settings?.dateRange ?? DEFAULT_DATE_RANGE
range: this.user?.settings?.dateRange ?? DEFAULT_USER_DATE_RANGE
}),
investments: this.dataService.fetchInvestments({
filters: this.userService.getFilters(),
groupBy: this.mode(),
range: this.user?.settings?.dateRange ?? DEFAULT_DATE_RANGE
range: this.user?.settings?.dateRange ?? DEFAULT_USER_DATE_RANGE
})
})
.pipe(takeUntilDestroyed(this.destroyRef))
@ -323,7 +323,7 @@ export class GfAnalysisPageComponent implements OnInit {
.fetchPortfolioPerformance({
filters: this.userService.getFilters(),
groupBy: 'year',
range: this.user?.settings?.dateRange ?? DEFAULT_DATE_RANGE
range: this.user?.settings?.dateRange ?? DEFAULT_USER_DATE_RANGE
})
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(({ chart }) => {
@ -353,7 +353,7 @@ export class GfAnalysisPageComponent implements OnInit {
this.dataService
.fetchPortfolioPerformance({
filters: this.userService.getFilters(),
range: this.user?.settings?.dateRange ?? DEFAULT_DATE_RANGE
range: this.user?.settings?.dateRange ?? DEFAULT_USER_DATE_RANGE
})
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(({ chart, dateOfFirstActivity, performance }) => {
@ -482,7 +482,7 @@ export class GfAnalysisPageComponent implements OnInit {
dataSource,
symbol,
filters: this.userService.getFilters(),
range: this.user?.settings?.dateRange ?? DEFAULT_DATE_RANGE,
range: this.user?.settings?.dateRange ?? DEFAULT_USER_DATE_RANGE,
startDate: this.dateOfFirstActivity
})
.pipe(takeUntilDestroyed(this.destroyRef))

1
libs/common/src/lib/config.ts

@ -100,6 +100,7 @@ export const STATISTICS_GATHERING_QUEUE = 'STATISTICS_GATHERING_QUEUE';
export const DEFAULT_CURRENCY = 'USD';
export const DEFAULT_DATE_FORMAT_MONTH_YEAR = 'MMM yyyy';
export const DEFAULT_DATE_RANGE: DateRange = 'max';
export const DEFAULT_USER_DATE_RANGE: DateRange = 'ytd';
export const DEFAULT_HOST = '0.0.0.0';
export const DEFAULT_LANGUAGE_CODE = 'en';
export const DEFAULT_LOCALE = 'en-US';

Loading…
Cancel
Save