+
}
+
+
+
+
Sponsors
+
+
Browser testing via
+
+
+
+
+
+
+
diff --git a/apps/client/src/app/pages/accounts/accounts-page.component.ts b/apps/client/src/app/pages/accounts/accounts-page.component.ts
index f09901e45..3a1616b6f 100644
--- a/apps/client/src/app/pages/accounts/accounts-page.component.ts
+++ b/apps/client/src/app/pages/accounts/accounts-page.component.ts
@@ -23,6 +23,8 @@ import { EMPTY, Subject, Subscription } from 'rxjs';
import { catchError, takeUntil } from 'rxjs/operators';
import { GfCreateOrUpdateAccountDialogComponent } from './create-or-update-account-dialog/create-or-update-account-dialog.component';
+import { CreateOrUpdateAccountDialogParams } from './create-or-update-account-dialog/interfaces/interfaces';
+import { TransferBalanceDialogParams } from './transfer-balance/interfaces/interfaces';
import { GfTransferBalanceDialogComponent } from './transfer-balance/transfer-balance-dialog.component';
@Component({
@@ -179,7 +181,10 @@ export class GfAccountsPageComponent implements OnDestroy, OnInit {
name,
platformId
}: AccountModel) {
- const dialogRef = this.dialog.open(GfCreateOrUpdateAccountDialogComponent, {
+ const dialogRef = this.dialog.open<
+ GfCreateOrUpdateAccountDialogComponent,
+ CreateOrUpdateAccountDialogParams
+ >(GfCreateOrUpdateAccountDialogComponent, {
data: {
account: {
balance,
@@ -227,7 +232,10 @@ export class GfAccountsPageComponent implements OnDestroy, OnInit {
}
private openAccountDetailDialog(aAccountId: string) {
- const dialogRef = this.dialog.open(GfAccountDetailDialogComponent, {
+ const dialogRef = this.dialog.open<
+ GfAccountDetailDialogComponent,
+ AccountDetailDialogParams
+ >(GfAccountDetailDialogComponent, {
autoFocus: false,
data: {
accountId: aAccountId,
@@ -237,7 +245,7 @@ export class GfAccountsPageComponent implements OnDestroy, OnInit {
!this.hasImpersonationId &&
hasPermission(this.user?.permissions, permissions.createOrder) &&
!this.user?.settings?.isRestrictedView
- } as AccountDetailDialogParams,
+ },
height: this.deviceType === 'mobile' ? '98vh' : '80vh',
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
@@ -253,12 +261,16 @@ export class GfAccountsPageComponent implements OnDestroy, OnInit {
}
private openCreateAccountDialog() {
- const dialogRef = this.dialog.open(GfCreateOrUpdateAccountDialogComponent, {
+ const dialogRef = this.dialog.open<
+ GfCreateOrUpdateAccountDialogComponent,
+ CreateOrUpdateAccountDialogParams
+ >(GfCreateOrUpdateAccountDialogComponent, {
data: {
account: {
balance: 0,
comment: null,
currency: this.user?.settings?.baseCurrency,
+ id: null,
isExcluded: false,
name: null,
platformId: null
@@ -295,7 +307,10 @@ export class GfAccountsPageComponent implements OnDestroy, OnInit {
}
private openTransferBalanceDialog() {
- const dialogRef = this.dialog.open(GfTransferBalanceDialogComponent, {
+ const dialogRef = this.dialog.open<
+ GfTransferBalanceDialogComponent,
+ TransferBalanceDialogParams
+ >(GfTransferBalanceDialogComponent, {
data: {
accounts: this.accounts
},
diff --git a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/interfaces/interfaces.ts b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/interfaces/interfaces.ts
index ffe4f14f6..a3e6272f8 100644
--- a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/interfaces/interfaces.ts
+++ b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/interfaces/interfaces.ts
@@ -1,5 +1,5 @@
import { Account } from '@prisma/client';
export interface CreateOrUpdateAccountDialogParams {
- account: Account;
+ account: Omit
;
}
diff --git a/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts b/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts
index ce99fbf77..6ee02bd8e 100644
--- a/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts
+++ b/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts
@@ -28,6 +28,7 @@ import { Subject, Subscription } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { GfCreateOrUpdateActivityDialogComponent } from './create-or-update-activity-dialog/create-or-update-activity-dialog.component';
+import { CreateOrUpdateActivityDialogParams } from './create-or-update-activity-dialog/interfaces/interfaces';
import { GfImportActivitiesDialogComponent } from './import-activities-dialog/import-activities-dialog.component';
import { ImportActivitiesDialogParams } from './import-activities-dialog/interfaces/interfaces';
@@ -245,11 +246,14 @@ export class GfActivitiesPageComponent implements OnDestroy, OnInit {
}
public onImport() {
- const dialogRef = this.dialog.open(GfImportActivitiesDialogComponent, {
+ const dialogRef = this.dialog.open<
+ GfImportActivitiesDialogComponent,
+ ImportActivitiesDialogParams
+ >(GfImportActivitiesDialogComponent, {
data: {
deviceType: this.deviceType,
user: this.user
- } as ImportActivitiesDialogParams,
+ },
height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
@@ -268,12 +272,15 @@ export class GfActivitiesPageComponent implements OnDestroy, OnInit {
}
public onImportDividends() {
- const dialogRef = this.dialog.open(GfImportActivitiesDialogComponent, {
+ const dialogRef = this.dialog.open<
+ GfImportActivitiesDialogComponent,
+ ImportActivitiesDialogParams
+ >(GfImportActivitiesDialogComponent, {
data: {
activityTypes: ['DIVIDEND'],
deviceType: this.deviceType,
user: this.user
- } as ImportActivitiesDialogParams,
+ },
height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
@@ -306,18 +313,18 @@ export class GfActivitiesPageComponent implements OnDestroy, OnInit {
}
public openUpdateActivityDialog(aActivity: Activity) {
- const dialogRef = this.dialog.open(
+ const dialogRef = this.dialog.open<
GfCreateOrUpdateActivityDialogComponent,
- {
- data: {
- activity: aActivity,
- accounts: this.user?.accounts,
- user: this.user
- },
- height: this.deviceType === 'mobile' ? '98vh' : '80vh',
- width: this.deviceType === 'mobile' ? '100vw' : '50rem'
- }
- );
+ CreateOrUpdateActivityDialogParams
+ >(GfCreateOrUpdateActivityDialogComponent, {
+ data: {
+ activity: aActivity,
+ accounts: this.user?.accounts,
+ user: this.user
+ },
+ height: this.deviceType === 'mobile' ? '98vh' : '80vh',
+ width: this.deviceType === 'mobile' ? '100vw' : '50rem'
+ });
dialogRef
.afterClosed()
@@ -350,26 +357,26 @@ export class GfActivitiesPageComponent implements OnDestroy, OnInit {
.subscribe((user) => {
this.updateUser(user);
- const dialogRef = this.dialog.open(
+ const dialogRef = this.dialog.open<
GfCreateOrUpdateActivityDialogComponent,
- {
- data: {
- accounts: this.user?.accounts,
- activity: {
- ...aActivity,
- accountId: aActivity?.accountId,
- date: new Date(),
- id: null,
- fee: 0,
- type: aActivity?.type ?? 'BUY',
- unitPrice: null
- },
- user: this.user
+ CreateOrUpdateActivityDialogParams
+ >(GfCreateOrUpdateActivityDialogComponent, {
+ data: {
+ accounts: this.user?.accounts,
+ activity: {
+ ...aActivity,
+ accountId: aActivity?.accountId,
+ date: new Date(),
+ id: null,
+ fee: 0,
+ type: aActivity?.type ?? 'BUY',
+ unitPrice: null
},
- height: this.deviceType === 'mobile' ? '98vh' : '80vh',
- width: this.deviceType === 'mobile' ? '100vw' : '50rem'
- }
- );
+ user: this.user
+ },
+ height: this.deviceType === 'mobile' ? '98vh' : '80vh',
+ width: this.deviceType === 'mobile' ? '100vw' : '50rem'
+ });
dialogRef
.afterClosed()
diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/interfaces/interfaces.ts b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/interfaces/interfaces.ts
index 60a39d361..cc454a66a 100644
--- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/interfaces/interfaces.ts
+++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/interfaces/interfaces.ts
@@ -4,7 +4,6 @@ import { User } from '@ghostfolio/common/interfaces';
import { Account } from '@prisma/client';
export interface CreateOrUpdateActivityDialogParams {
- accountId: string;
accounts: Account[];
activity: Activity;
user: User;
diff --git a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/interfaces/interfaces.ts b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/interfaces/interfaces.ts
index a2131db88..051345e60 100644
--- a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/interfaces/interfaces.ts
+++ b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/interfaces/interfaces.ts
@@ -3,7 +3,7 @@ import { User } from '@ghostfolio/common/interfaces';
import { Type } from '@prisma/client';
export interface ImportActivitiesDialogParams {
- activityTypes: Type[];
+ activityTypes?: Type[];
deviceType: string;
user: User;
}
diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
index da909a78d..b4de51701 100644
--- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
@@ -558,7 +558,10 @@ export class GfAllocationsPageComponent implements OnDestroy, OnInit {
}
private openAccountDetailDialog(aAccountId: string) {
- const dialogRef = this.dialog.open(GfAccountDetailDialogComponent, {
+ const dialogRef = this.dialog.open<
+ GfAccountDetailDialogComponent,
+ AccountDetailDialogParams
+ >(GfAccountDetailDialogComponent, {
autoFocus: false,
data: {
accountId: aAccountId,
@@ -568,7 +571,7 @@ export class GfAllocationsPageComponent implements OnDestroy, OnInit {
!this.hasImpersonationId &&
hasPermission(this.user?.permissions, permissions.createOrder) &&
!this.user?.settings?.isRestrictedView
- } as AccountDetailDialogParams,
+ },
height: this.deviceType === 'mobile' ? '98vh' : '80vh',
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
diff --git a/apps/client/src/app/pages/register/register-page.component.ts b/apps/client/src/app/pages/register/register-page.component.ts
index eff4e308b..acf3c40eb 100644
--- a/apps/client/src/app/pages/register/register-page.component.ts
+++ b/apps/client/src/app/pages/register/register-page.component.ts
@@ -84,18 +84,18 @@ export class GfRegisterPageComponent implements OnDestroy, OnInit {
}
public openShowAccessTokenDialog() {
- const dialogRef = this.dialog.open(
+ 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'
- }
- );
+ UserAccountRegistrationDialogParams
+ >(GfUserAccountRegistrationDialogComponent, {
+ data: {
+ deviceType: this.deviceType,
+ needsToAcceptTermsOfService: this.hasPermissionForSubscription
+ },
+ disableClose: true,
+ height: this.deviceType === 'mobile' ? '98vh' : undefined,
+ width: this.deviceType === 'mobile' ? '100vw' : '30rem'
+ });
dialogRef
.afterClosed()
diff --git a/apps/client/src/app/pages/resources/glossary/resources-glossary.component.html b/apps/client/src/app/pages/resources/glossary/resources-glossary.component.html
index b65054bba..fa74cd084 100644
--- a/apps/client/src/app/pages/resources/glossary/resources-glossary.component.html
+++ b/apps/client/src/app/pages/resources/glossary/resources-glossary.component.html
@@ -5,7 +5,7 @@