diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page-routing.module.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page-routing.module.ts
new file mode 100644
index 000000000..8b2182fe4
--- /dev/null
+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page-routing.module.ts
@@ -0,0 +1,15 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
+
+import { AllocationsPageComponent } from './allocations-page.component';
+
+const routes: Routes = [
+ { path: '', component: AllocationsPageComponent, canActivate: [AuthGuard] }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class AllocationsPageRoutingModule {}
diff --git a/apps/client/src/app/pages/tools/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
similarity index 91%
rename from apps/client/src/app/pages/tools/analysis/analysis-page.component.ts
rename to apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
index 433bf63b1..6aaf81148 100644
--- a/apps/client/src/app/pages/tools/analysis/analysis-page.component.ts
+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
@@ -4,22 +4,17 @@ import { DataService } from '@ghostfolio/client/services/data.service';
import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { UNKNOWN_KEY } from '@ghostfolio/common/config';
-import {
- PortfolioItem,
- PortfolioPosition,
- User
-} from '@ghostfolio/common/interfaces';
-import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface';
+import { PortfolioPosition, User } from '@ghostfolio/common/interfaces';
import { DeviceDetectorService } from 'ngx-device-detector';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
@Component({
- selector: 'gf-analysis-page',
- templateUrl: './analysis-page.html',
- styleUrls: ['./analysis-page.scss']
+ selector: 'gf-allocations-page',
+ templateUrl: './allocations-page.html',
+ styleUrls: ['./allocations-page.scss']
})
-export class AnalysisPageComponent implements OnDestroy, OnInit {
+export class AllocationsPageComponent implements OnDestroy, OnInit {
public accounts: {
[symbol: string]: Pick
& { value: number };
};
@@ -36,7 +31,6 @@ export class AnalysisPageComponent implements OnDestroy, OnInit {
{ label: 'Initial', value: 'original' },
{ label: 'Current', value: 'current' }
];
- public investments: InvestmentItem[];
public portfolioPositions: { [symbol: string]: PortfolioPosition };
public positions: { [symbol: string]: any };
public positionsArray: PortfolioPosition[];
@@ -71,15 +65,6 @@ export class AnalysisPageComponent implements OnDestroy, OnInit {
this.hasImpersonationId = !!aId;
});
- this.dataService
- .fetchInvestments()
- .pipe(takeUntil(this.unsubscribeSubject))
- .subscribe((response) => {
- this.investments = response;
-
- this.changeDetectorRef.markForCheck();
- });
-
this.dataService
.fetchPortfolioPositions({})
.pipe(takeUntil(this.unsubscribeSubject))
diff --git a/apps/client/src/app/pages/tools/analysis/analysis-page.html b/apps/client/src/app/pages/portfolio/allocations/allocations-page.html
similarity index 87%
rename from apps/client/src/app/pages/tools/analysis/analysis-page.html
rename to apps/client/src/app/pages/portfolio/allocations/allocations-page.html
index 37137839b..05f34d318 100644
--- a/apps/client/src/app/pages/tools/analysis/analysis-page.html
+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.html
@@ -1,16 +1,14 @@
-
Analysis
-
-
Positions
-
-
+
Allocations
+
@@ -192,20 +190,4 @@
-
-
-
-
- Timeline
-
-
-
-
-
-
-
diff --git a/apps/client/src/app/pages/tools/analysis/analysis-page.module.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.module.ts
similarity index 68%
rename from apps/client/src/app/pages/tools/analysis/analysis-page.module.ts
rename to apps/client/src/app/pages/portfolio/allocations/allocations-page.module.ts
index d8974b3ca..d5d9fe0b5 100644
--- a/apps/client/src/app/pages/tools/analysis/analysis-page.module.ts
+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.module.ts
@@ -1,22 +1,20 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { MatCardModule } from '@angular/material/card';
-import { GfInvestmentChartModule } from '@ghostfolio/client/components/investment-chart/investment-chart.module';
import { PortfolioProportionChartModule } from '@ghostfolio/client/components/portfolio-proportion-chart/portfolio-proportion-chart.module';
import { GfPositionsTableModule } from '@ghostfolio/client/components/positions-table/positions-table.module';
import { GfToggleModule } from '@ghostfolio/client/components/toggle/toggle.module';
import { GfWorldMapChartModule } from '@ghostfolio/client/components/world-map-chart/world-map-chart.module';
-import { AnalysisPageRoutingModule } from './analysis-page-routing.module';
-import { AnalysisPageComponent } from './analysis-page.component';
+import { AllocationsPageRoutingModule } from './allocations-page-routing.module';
+import { AllocationsPageComponent } from './allocations-page.component';
@NgModule({
- declarations: [AnalysisPageComponent],
+ declarations: [AllocationsPageComponent],
exports: [],
imports: [
- AnalysisPageRoutingModule,
+ AllocationsPageRoutingModule,
CommonModule,
- GfInvestmentChartModule,
GfPositionsTableModule,
GfToggleModule,
GfWorldMapChartModule,
@@ -26,4 +24,4 @@ import { AnalysisPageComponent } from './analysis-page.component';
providers: [],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
-export class AnalysisPageModule {}
+export class AllocationsPageModule {}
diff --git a/apps/client/src/app/pages/tools/analysis/analysis-page.scss b/apps/client/src/app/pages/portfolio/allocations/allocations-page.scss
similarity index 76%
rename from apps/client/src/app/pages/tools/analysis/analysis-page.scss
rename to apps/client/src/app/pages/portfolio/allocations/allocations-page.scss
index 09e4ea30d..b41677eb6 100644
--- a/apps/client/src/app/pages/tools/analysis/analysis-page.scss
+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.scss
@@ -1,16 +1,4 @@
:host {
- .investment-chart {
- .mat-card {
- .mat-card-content {
- aspect-ratio: 16 / 9;
-
- gf-investment-chart {
- height: 100%;
- }
- }
- }
- }
-
.proportion-charts {
.mat-card {
.mat-card-content {
diff --git a/apps/client/src/app/pages/tools/analysis/analysis-page-routing.module.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page-routing.module.ts
similarity index 100%
rename from apps/client/src/app/pages/tools/analysis/analysis-page-routing.module.ts
rename to apps/client/src/app/pages/portfolio/analysis/analysis-page-routing.module.ts
diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts
new file mode 100644
index 000000000..187683930
--- /dev/null
+++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts
@@ -0,0 +1,92 @@
+import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
+import { ToggleOption } from '@ghostfolio/client/components/toggle/interfaces/toggle-option.type';
+import { DataService } from '@ghostfolio/client/services/data.service';
+import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service';
+import { UserService } from '@ghostfolio/client/services/user/user.service';
+import { PortfolioPosition, User } from '@ghostfolio/common/interfaces';
+import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface';
+import { DeviceDetectorService } from 'ngx-device-detector';
+import { Subject } from 'rxjs';
+import { takeUntil } from 'rxjs/operators';
+
+@Component({
+ selector: 'gf-analysis-page',
+ templateUrl: './analysis-page.html',
+ styleUrls: ['./analysis-page.scss']
+})
+export class AnalysisPageComponent implements OnDestroy, OnInit {
+ public accounts: {
+ [symbol: string]: Pick