Browse Source
Merge branch 'main' into task/improve-language-localization-by-translating-various-tooltips
pull/7190/head
Thomas Kaul
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with
60 additions and
20 deletions
-
CHANGELOG.md
-
apps/api/src/services/benchmark/benchmark.service.spec.ts
-
apps/api/src/services/benchmark/benchmark.service.ts
-
apps/client/src/app/components/header/header.component.html
-
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
-
libs/ui/src/lib/account-balances/account-balances.component.html
-
libs/ui/src/lib/benchmark/benchmark.component.html
-
libs/ui/src/lib/benchmark/benchmark.component.ts
-
libs/ui/src/lib/fire-calculator/fire-calculator.component.html
-
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
-
libs/ui/src/lib/value/value.component.ts
-
package-lock.json
-
package.json
|
|
|
@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
- Improved the language localization by translating various tooltips across the application |
|
|
|
|
|
|
|
## 3.19.0 - 2026-07-02 |
|
|
|
## 3.19.1 - 2026-07-03 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
|
|
@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Harmonized the date picker styling across various components |
|
|
|
- Updated the _Privacy Policy_ |
|
|
|
- Updated the _Terms of Service_ |
|
|
|
- Improved the parsing of integer query parameters (`skip` and `take`) in the `GET api/v1/activities` endpoint |
|
|
|
@ -30,6 +31,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed an issue where values incorrectly rounded to negative zero in the value component |
|
|
|
- Fixed the colorization of the change from all time high in the benchmark component when values round to zero |
|
|
|
- Fixed the market condition of the benchmarks when values round to zero |
|
|
|
- Fixed the validation of the data source field of an asset profile with market data |
|
|
|
- Fixed a recurring issue where single-value fields were incorrectly validated as arrays in various endpoints |
|
|
|
|
|
|
|
|
|
|
|
@ -12,4 +12,16 @@ describe('BenchmarkService', () => { |
|
|
|
expect(benchmarkService.calculateChangeInPercentage(2, 2)).toEqual(0); |
|
|
|
expect(benchmarkService.calculateChangeInPercentage(2, 1)).toEqual(-0.5); |
|
|
|
}); |
|
|
|
|
|
|
|
it('getMarketCondition', async () => { |
|
|
|
expect(benchmarkService.getMarketCondition(0)).toEqual('ALL_TIME_HIGH'); |
|
|
|
expect(benchmarkService.getMarketCondition(-5.90736454893e-9)).toEqual( |
|
|
|
'ALL_TIME_HIGH' |
|
|
|
); |
|
|
|
expect(benchmarkService.getMarketCondition(-0.1)).toEqual('NEUTRAL_MARKET'); |
|
|
|
expect(benchmarkService.getMarketCondition(-0.19996)).toEqual( |
|
|
|
'BEAR_MARKET' |
|
|
|
); |
|
|
|
expect(benchmarkService.getMarketCondition(-0.2)).toEqual('BEAR_MARKET'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
@ -24,7 +24,7 @@ import { Injectable, Logger } from '@nestjs/common'; |
|
|
|
import { SymbolProfile } from '@prisma/client'; |
|
|
|
import { Big } from 'big.js'; |
|
|
|
import { addHours, isAfter, subDays } from 'date-fns'; |
|
|
|
import { uniqBy } from 'lodash'; |
|
|
|
import { round, uniqBy } from 'lodash'; |
|
|
|
import ms from 'ms'; |
|
|
|
|
|
|
|
import { BenchmarkValue } from './interfaces/benchmark-value.interface'; |
|
|
|
@ -220,9 +220,11 @@ export class BenchmarkService { |
|
|
|
public getMarketCondition( |
|
|
|
aPerformanceInPercent: number |
|
|
|
): Benchmark['marketCondition'] { |
|
|
|
if (aPerformanceInPercent >= 0) { |
|
|
|
const performanceInPercent = round(aPerformanceInPercent, 4); |
|
|
|
|
|
|
|
if (performanceInPercent >= 0) { |
|
|
|
return 'ALL_TIME_HIGH'; |
|
|
|
} else if (aPerformanceInPercent <= -0.2) { |
|
|
|
} else if (performanceInPercent <= -0.2) { |
|
|
|
return 'BEAR_MARKET'; |
|
|
|
} else { |
|
|
|
return 'NEUTRAL_MARKET'; |
|
|
|
|
|
|
|
@ -332,7 +332,7 @@ |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
} |
|
|
|
@if (user() === null) { |
|
|
|
@if (!user()) { |
|
|
|
<div class="d-flex h-100 logo-container" [class.filled]="hasTabs()"> |
|
|
|
<a |
|
|
|
class="align-items-center h-100 justify-content-start px-2 px-sm-3 rounded-0" |
|
|
|
|
|
|
|
@ -167,7 +167,7 @@ |
|
|
|
name="calendar-clear-outline" |
|
|
|
/> |
|
|
|
</mat-datepicker-toggle> |
|
|
|
<mat-datepicker #date disabled="false" /> |
|
|
|
<mat-datepicker #date /> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
|
|
|
|
@ -22,7 +22,7 @@ |
|
|
|
[matDatepicker]="date" |
|
|
|
[max]="maxDate" |
|
|
|
/> |
|
|
|
<mat-datepicker-toggle matSuffix [for]="date"> |
|
|
|
<mat-datepicker-toggle class="mr-2" matSuffix [for]="date"> |
|
|
|
<ion-icon |
|
|
|
class="text-muted" |
|
|
|
matDatepickerToggleIcon |
|
|
|
|
|
|
|
@ -135,9 +135,15 @@ |
|
|
|
class="d-inline-block justify-content-end" |
|
|
|
[class]="{ |
|
|
|
'text-danger': |
|
|
|
element?.performances?.allTimeHigh?.performancePercent < 0, |
|
|
|
round( |
|
|
|
element?.performances?.allTimeHigh?.performancePercent, |
|
|
|
4 |
|
|
|
) < 0, |
|
|
|
'text-success': |
|
|
|
element?.performances?.allTimeHigh?.performancePercent === 0 |
|
|
|
round( |
|
|
|
element?.performances?.allTimeHigh?.performancePercent, |
|
|
|
4 |
|
|
|
) === 0 |
|
|
|
}" |
|
|
|
[isPercent]="true" |
|
|
|
[locale]="locale()" |
|
|
|
|
|
|
|
@ -33,7 +33,7 @@ import { ActivatedRoute, Router, RouterModule } from '@angular/router'; |
|
|
|
import { IonIcon } from '@ionic/angular/standalone'; |
|
|
|
import { addIcons } from 'ionicons'; |
|
|
|
import { ellipsisHorizontal, trashOutline } from 'ionicons/icons'; |
|
|
|
import { isNumber } from 'lodash'; |
|
|
|
import { isNumber, round } from 'lodash'; |
|
|
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
|
|
|
|
|
|
|
import { GfEntityLogoComponent } from '../entity-logo/entity-logo.component'; |
|
|
|
@ -92,6 +92,7 @@ export class GfBenchmarkComponent { |
|
|
|
protected isLoading = true; |
|
|
|
protected readonly isNumber = isNumber; |
|
|
|
protected readonly resolveMarketCondition = resolveMarketCondition; |
|
|
|
protected readonly round = round; |
|
|
|
protected readonly translate = translate; |
|
|
|
|
|
|
|
private readonly destroyRef = inject(DestroyRef); |
|
|
|
|
|
|
|
@ -39,19 +39,26 @@ |
|
|
|
class="d-none" |
|
|
|
formControlName="retirementDate" |
|
|
|
matInput |
|
|
|
[matDatepicker]="datepicker" |
|
|
|
[matDatepicker]="date" |
|
|
|
[min]="minDate" |
|
|
|
/> |
|
|
|
<mat-datepicker-toggle |
|
|
|
matIconSuffix |
|
|
|
class="mr-2" |
|
|
|
matSuffix |
|
|
|
[disabled]="hasPermissionToUpdateUserSettings !== true" |
|
|
|
[for]="datepicker" |
|
|
|
/> |
|
|
|
[for]="date" |
|
|
|
> |
|
|
|
<ion-icon |
|
|
|
class="text-muted" |
|
|
|
matDatepickerToggleIcon |
|
|
|
name="calendar-clear-outline" |
|
|
|
/> |
|
|
|
</mat-datepicker-toggle> |
|
|
|
<mat-datepicker |
|
|
|
#datepicker |
|
|
|
#date |
|
|
|
startView="multi-year" |
|
|
|
[disabled]="hasPermissionToUpdateUserSettings !== true" |
|
|
|
(monthSelected)="setMonthAndYear($event, datepicker)" |
|
|
|
(monthSelected)="setMonthAndYear($event, date)" |
|
|
|
/> |
|
|
|
</mat-form-field> |
|
|
|
|
|
|
|
|
|
|
|
@ -34,6 +34,7 @@ import { |
|
|
|
} from '@angular/material/datepicker'; |
|
|
|
import { MatFormFieldModule } from '@angular/material/form-field'; |
|
|
|
import { MatInputModule } from '@angular/material/input'; |
|
|
|
import { IonIcon } from '@ionic/angular/standalone'; |
|
|
|
import { |
|
|
|
BarController, |
|
|
|
BarElement, |
|
|
|
@ -56,6 +57,8 @@ import { |
|
|
|
startOfMonth, |
|
|
|
sub |
|
|
|
} from 'date-fns'; |
|
|
|
import { addIcons } from 'ionicons'; |
|
|
|
import { calendarClearOutline } from 'ionicons/icons'; |
|
|
|
import { isNumber } from 'lodash'; |
|
|
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
|
|
|
import { debounceTime } from 'rxjs'; |
|
|
|
@ -67,6 +70,7 @@ import { FireCalculatorService } from './fire-calculator.service'; |
|
|
|
imports: [ |
|
|
|
CommonModule, |
|
|
|
FormsModule, |
|
|
|
IonIcon, |
|
|
|
MatButtonModule, |
|
|
|
MatDatepickerModule, |
|
|
|
MatFormFieldModule, |
|
|
|
@ -136,6 +140,8 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy { |
|
|
|
Tooltip |
|
|
|
); |
|
|
|
|
|
|
|
addIcons({ calendarClearOutline }); |
|
|
|
|
|
|
|
this.calculatorForm.valueChanges |
|
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
|
.subscribe(() => { |
|
|
|
|
|
|
|
@ -168,7 +168,9 @@ export class GfValueComponent implements AfterViewInit, OnChanges { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.formattedValue === '0.00') { |
|
|
|
if (/^-?0([.,]0*)?$/.test(this.formattedValue)) { |
|
|
|
// Remove algebraic sign of values rounding to zero
|
|
|
|
this.formattedValue = this.formattedValue.replace(/^-/, ''); |
|
|
|
this.useAbsoluteValue = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,12 +1,12 @@ |
|
|
|
{ |
|
|
|
"name": "ghostfolio", |
|
|
|
"version": "3.19.0", |
|
|
|
"version": "3.19.1", |
|
|
|
"lockfileVersion": 3, |
|
|
|
"requires": true, |
|
|
|
"packages": { |
|
|
|
"": { |
|
|
|
"name": "ghostfolio", |
|
|
|
"version": "3.19.0", |
|
|
|
"version": "3.19.1", |
|
|
|
"hasInstallScript": true, |
|
|
|
"license": "AGPL-3.0", |
|
|
|
"dependencies": { |
|
|
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
{ |
|
|
|
"name": "ghostfolio", |
|
|
|
"version": "3.19.0", |
|
|
|
"version": "3.19.1", |
|
|
|
"homepage": "https://ghostfol.io", |
|
|
|
"license": "AGPL-3.0", |
|
|
|
"repository": "https://github.com/ghostfolio/ghostfolio", |
|
|
|
|