Browse Source

Merge remote-tracking branch 'origin/main' into bugfix/portfolio-calculator-precision-issues

pull/5509/head
KenTandrian 1 month ago
parent
commit
f37f33df74
  1. 2
      .github/FUNDING.yml
  2. 12
      CHANGELOG.md
  3. 1
      apps/api/src/interceptors/redact-values-in-response/redact-values-in-response.interceptor.ts
  4. 1
      apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
  5. 1
      apps/client/src/app/components/home-market/home-market.html
  6. 1
      apps/client/src/app/components/markets/markets.html
  7. 25
      apps/client/src/app/pages/register/register-page.component.ts
  8. 2
      apps/client/src/app/pages/register/user-account-registration-dialog/interfaces/interfaces.ts
  9. 12
      apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts
  10. 0
      apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.html
  11. 0
      apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.scss
  12. 7
      libs/ui/src/lib/activities-table/activities-table.component.ts
  13. 9
      libs/ui/src/lib/benchmark/benchmark.component.html
  14. 1
      libs/ui/src/lib/benchmark/benchmark.component.ts
  15. 8
      package-lock.json
  16. 2
      package.json

2
.github/FUNDING.yml

@ -1 +1 @@
custom: ['https://www.buymeacoffee.com/ghostfolio']
buy_me_a_coffee: ghostfolio

12
CHANGELOG.md

@ -7,9 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Added
- Added the symbol to the benchmark component
- Added an option to configure the account column of the activities table component
### Changed
- Hid the account column from the activities table of the account detail dialog to avoid redundant information
- Renamed the show access token dialog component to user account registration dialog component
- Refreshed the cryptocurrencies list
- Upgraded `countup.js` from version `2.8.2` to `2.9.0`
### Fixed
- Fixed an issue with `unitPriceInAssetProfileCurrency` in the value redaction interceptor for the impersonation mode
### Fixed

1
apps/api/src/interceptors/redact-values-in-response/redact-values-in-response.interceptor.ts

@ -61,6 +61,7 @@ export class RedactValuesInResponseInterceptor<T>
'totalInterestInBaseCurrency',
'totalValueInBaseCurrency',
'unitPrice',
'unitPriceInAssetProfileCurrency',
'value',
'valueInBaseCurrency'
].map((attribute) => {

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

@ -126,6 +126,7 @@
[hasPermissionToFilter]="false"
[hasPermissionToOpenDetails]="false"
[locale]="user?.settings?.locale"
[showAccountColumn]="false"
[showActions]="
!data.hasImpersonationId &&
data.hasPermissionToCreateActivity &&

1
apps/client/src/app/components/home-market/home-market.html

@ -34,6 +34,7 @@
[benchmarks]="benchmarks"
[deviceType]="deviceType"
[locale]="user?.settings?.locale || undefined"
[showSymbol]="false"
[user]="user"
/>
@if (benchmarks?.length > 0) {

1
apps/client/src/app/components/markets/markets.html

@ -43,6 +43,7 @@
[benchmarks]="benchmarks"
[deviceType]="deviceType"
[locale]="user?.settings?.locale || undefined"
[showSymbol]="false"
[user]="user"
/>
@if (benchmarks?.length > 0) {

25
apps/client/src/app/pages/register/register-page.component.ts

@ -18,8 +18,8 @@ import { DeviceDetectorService } from 'ngx-device-detector';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { ShowAccessTokenDialogParams } from './show-access-token-dialog/interfaces/interfaces';
import { GfShowAccessTokenDialogComponent } from './show-access-token-dialog/show-access-token-dialog.component';
import { UserAccountRegistrationDialogParams } from './user-account-registration-dialog/interfaces/interfaces';
import { GfUserAccountRegistrationDialogComponent } from './user-account-registration-dialog/user-account-registration-dialog.component';
@Component({
host: { class: 'page' },
@ -84,15 +84,18 @@ export class GfRegisterPageComponent implements OnDestroy, OnInit {
}
public openShowAccessTokenDialog() {
const dialogRef = this.dialog.open(GfShowAccessTokenDialogComponent, {
data: {
deviceType: this.deviceType,
needsToAcceptTermsOfService: this.hasPermissionForSubscription
} as ShowAccessTokenDialogParams,
disableClose: true,
height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '30rem'
});
const dialogRef = this.dialog.open(
GfUserAccountRegistrationDialogComponent,
{
data: {
deviceType: this.deviceType,
needsToAcceptTermsOfService: this.hasPermissionForSubscription
} as UserAccountRegistrationDialogParams,
disableClose: true,
height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '30rem'
}
);
dialogRef
.afterClosed()

2
apps/client/src/app/pages/register/show-access-token-dialog/interfaces/interfaces.ts → apps/client/src/app/pages/register/user-account-registration-dialog/interfaces/interfaces.ts

@ -1,4 +1,4 @@
export interface ShowAccessTokenDialogParams {
export interface UserAccountRegistrationDialogParams {
deviceType: string;
needsToAcceptTermsOfService: boolean;
}

12
apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts → apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts

@ -30,7 +30,7 @@ import {
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { ShowAccessTokenDialogParams } from './interfaces/interfaces';
import { UserAccountRegistrationDialogParams } from './interfaces/interfaces';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
@ -50,11 +50,11 @@ import { ShowAccessTokenDialogParams } from './interfaces/interfaces';
TextFieldModule
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
selector: 'gf-show-access-token-dialog',
styleUrls: ['./show-access-token-dialog.scss'],
templateUrl: 'show-access-token-dialog.html'
selector: 'gf-user-account-registration-dialog',
styleUrls: ['./user-account-registration-dialog.scss'],
templateUrl: 'user-account-registration-dialog.html'
})
export class GfShowAccessTokenDialogComponent {
export class GfUserAccountRegistrationDialogComponent {
@ViewChild(MatStepper) stepper!: MatStepper;
public accessToken: string;
@ -69,7 +69,7 @@ export class GfShowAccessTokenDialogComponent {
public constructor(
private changeDetectorRef: ChangeDetectorRef,
@Inject(MAT_DIALOG_DATA) public data: ShowAccessTokenDialogParams,
@Inject(MAT_DIALOG_DATA) public data: UserAccountRegistrationDialogParams,
private dataService: DataService
) {
addIcons({ arrowForwardOutline, checkmarkOutline, copyOutline });

0
apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html → apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.html

0
apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.scss → apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.scss

7
libs/ui/src/lib/activities-table/activities-table.component.ts

@ -104,6 +104,7 @@ export class GfActivitiesTableComponent
@Input() locale = getLocale();
@Input() pageIndex: number;
@Input() pageSize = DEFAULT_PAGE_SIZE;
@Input() showAccountColumn = true;
@Input() showActions = true;
@Input() showCheckbox = false;
@Input() showNameColumn = true;
@ -192,6 +193,12 @@ export class GfActivitiesTableComponent
'actions'
];
if (!this.showAccountColumn) {
this.displayedColumns = this.displayedColumns.filter((column) => {
return column !== 'account';
});
}
if (!this.showCheckbox) {
this.displayedColumns = this.displayedColumns.filter((column) => {
return column !== 'importStatus' && column !== 'select';

9
libs/ui/src/lib/benchmark/benchmark.component.html

@ -12,7 +12,14 @@
Name
</th>
<td *matCellDef="let element" class="px-2 text-nowrap" mat-cell>
{{ element?.name }}
<div class="text-truncate">
{{ element?.name }}
</div>
@if (showSymbol) {
<div>
<small class="text-muted">{{ element?.symbol }}</small>
</div>
}
</td>
</ng-container>

1
libs/ui/src/lib/benchmark/benchmark.component.ts

@ -62,6 +62,7 @@ export class GfBenchmarkComponent implements OnChanges, OnDestroy {
@Input() deviceType: string;
@Input() hasPermissionToDeleteItem: boolean;
@Input() locale = getLocale();
@Input() showSymbol = true;
@Input() user: User;
@Output() itemDeleted = new EventEmitter<AssetProfileIdentifier>();

8
package-lock.json

@ -64,7 +64,7 @@
"color": "5.0.0",
"countries-and-timezones": "3.8.0",
"countries-list": "3.1.1",
"countup.js": "2.8.2",
"countup.js": "2.9.0",
"date-fns": "4.1.0",
"envalid": "8.1.0",
"fuse.js": "7.1.0",
@ -18619,9 +18619,9 @@
"license": "MIT"
},
"node_modules/countup.js": {
"version": "2.8.2",
"resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.8.2.tgz",
"integrity": "sha512-UtRoPH6udaru/MOhhZhI/GZHJKAyAxuKItD2Tr7AbrqrOPBX/uejWBBJt8q86169AMqKkE9h9/24kFWbUk/Bag==",
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.9.0.tgz",
"integrity": "sha512-llqrvyXztRFPp6+i8jx25phHWcVWhrHO4Nlt0uAOSKHB8778zzQswa4MU3qKBvkXfJKftRYFJuVHez67lyKdHg==",
"license": "MIT"
},
"node_modules/create-jest": {

2
package.json

@ -110,7 +110,7 @@
"color": "5.0.0",
"countries-and-timezones": "3.8.0",
"countries-list": "3.1.1",
"countup.js": "2.8.2",
"countup.js": "2.9.0",
"date-fns": "4.1.0",
"envalid": "8.1.0",
"fuse.js": "7.1.0",

Loading…
Cancel
Save