Feature/improve usability of no activities info (#4382)
* Improve usability * Update changelog
This commit is contained in:
parent
3b68400a23
commit
f63d171678
@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Optimized the asynchronous operations using `Promise.all()` in the portfolio service (`getPerformance`)
|
- Optimized the asynchronous operations using `Promise.all()` in the portfolio service (`getPerformance`)
|
||||||
- Improved the symbol lookup in the _Trackinsight_ data enhancer for asset profile data
|
- Improved the symbol lookup in the _Trackinsight_ data enhancer for asset profile data
|
||||||
|
- Removed the no transactions info component from the holdings table on the home page
|
||||||
|
- Refactored the show condition of the step by step introduction for new users using the activities count
|
||||||
- Upgraded `color` from version `4.2.3` to `5.0.0`
|
- Upgraded `color` from version `4.2.3` to `5.0.0`
|
||||||
- Upgraded `prisma` from version `6.3.0` to `6.4.1`
|
- Upgraded `prisma` from version `6.3.0` to `6.4.1`
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
<gf-holdings-table
|
<gf-holdings-table
|
||||||
[baseCurrency]="user?.settings?.baseCurrency"
|
[baseCurrency]="user?.settings?.baseCurrency"
|
||||||
[deviceType]="deviceType"
|
[deviceType]="deviceType"
|
||||||
[hasPermissionToCreateActivity]="hasPermissionToCreateOrder"
|
|
||||||
[holdings]="holdings"
|
[holdings]="holdings"
|
||||||
[locale]="user?.settings?.locale"
|
[locale]="user?.settings?.locale"
|
||||||
(holdingClicked)="onHoldingClicked($event)"
|
(holdingClicked)="onHoldingClicked($event)"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div
|
<div
|
||||||
class="align-items-center container d-flex flex-column h-100 justify-content-center overview p-0 position-relative"
|
class="align-items-center container d-flex flex-column h-100 justify-content-center overview p-0 position-relative"
|
||||||
>
|
>
|
||||||
@if (hasPermissionToCreateOrder && historicalDataItems?.length === 0) {
|
@if (hasPermissionToCreateOrder && user?.activitiesCount === 0) {
|
||||||
<div class="justify-content-center row w-100">
|
<div class="justify-content-center row w-100">
|
||||||
<div class="col introduction">
|
<div class="col introduction">
|
||||||
<h4 i18n>Welcome to Ghostfolio</h4>
|
<h4 i18n>Welcome to Ghostfolio</h4>
|
||||||
|
@ -125,7 +125,10 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit {
|
|||||||
this.dataSource = new MatTableDataSource(activities);
|
this.dataSource = new MatTableDataSource(activities);
|
||||||
this.totalItems = count;
|
this.totalItems = count;
|
||||||
|
|
||||||
if (this.hasPermissionToCreateActivity && this.totalItems <= 0) {
|
if (
|
||||||
|
this.hasPermissionToCreateActivity &&
|
||||||
|
this.user?.activitiesCount === 0
|
||||||
|
) {
|
||||||
this.router.navigate([], { queryParams: { createDialog: true } });
|
this.router.navigate([], { queryParams: { createDialog: true } });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,6 +163,11 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit {
|
|||||||
})
|
})
|
||||||
.pipe(takeUntil(this.unsubscribeSubject))
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
|
this.userService
|
||||||
|
.get(true)
|
||||||
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.fetchActivities();
|
this.fetchActivities();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -169,6 +177,11 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit {
|
|||||||
.deleteActivity(aId)
|
.deleteActivity(aId)
|
||||||
.pipe(takeUntil(this.unsubscribeSubject))
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
|
this.userService
|
||||||
|
.get(true)
|
||||||
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.fetchActivities();
|
this.fetchActivities();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -230,6 +243,11 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit {
|
|||||||
.afterClosed()
|
.afterClosed()
|
||||||
.pipe(takeUntil(this.unsubscribeSubject))
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
|
this.userService
|
||||||
|
.get(true)
|
||||||
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.fetchActivities();
|
this.fetchActivities();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -248,6 +266,11 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit {
|
|||||||
.afterClosed()
|
.afterClosed()
|
||||||
.pipe(takeUntil(this.unsubscribeSubject))
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
|
this.userService
|
||||||
|
.get(true)
|
||||||
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.fetchActivities();
|
this.fetchActivities();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -333,6 +356,11 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit {
|
|||||||
if (transaction) {
|
if (transaction) {
|
||||||
this.dataService.postOrder(transaction).subscribe({
|
this.dataService.postOrder(transaction).subscribe({
|
||||||
next: () => {
|
next: () => {
|
||||||
|
this.userService
|
||||||
|
.get(true)
|
||||||
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
this.fetchActivities();
|
this.fetchActivities();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
[baseCurrency]="user?.settings?.baseCurrency"
|
[baseCurrency]="user?.settings?.baseCurrency"
|
||||||
[dataSource]="dataSource"
|
[dataSource]="dataSource"
|
||||||
[deviceType]="deviceType"
|
[deviceType]="deviceType"
|
||||||
[hasPermissionToCreateActivity]="hasPermissionToCreateActivity"
|
[hasPermissionToCreateActivity]="
|
||||||
|
hasPermissionToCreateActivity && user?.activitiesCount === 0
|
||||||
|
"
|
||||||
[hasPermissionToDeleteActivity]="hasPermissionToDeleteActivity"
|
[hasPermissionToDeleteActivity]="hasPermissionToDeleteActivity"
|
||||||
[hasPermissionToExportActivities]="!hasImpersonationId"
|
[hasPermissionToExportActivities]="!hasImpersonationId"
|
||||||
[locale]="user?.settings?.locale"
|
[locale]="user?.settings?.locale"
|
||||||
|
@ -198,11 +198,3 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (
|
|
||||||
dataSource.data.length === 0 && hasPermissionToCreateActivity && !isLoading
|
|
||||||
) {
|
|
||||||
<div class="p-3 text-center">
|
|
||||||
<gf-no-transactions-info-indicator [hasBorder]="false" />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
@ -5,7 +5,6 @@ import {
|
|||||||
AssetProfileIdentifier,
|
AssetProfileIdentifier,
|
||||||
PortfolioPosition
|
PortfolioPosition
|
||||||
} from '@ghostfolio/common/interfaces';
|
} from '@ghostfolio/common/interfaces';
|
||||||
import { GfNoTransactionsInfoComponent } from '@ghostfolio/ui/no-transactions-info';
|
|
||||||
import { GfValueComponent } from '@ghostfolio/ui/value';
|
import { GfValueComponent } from '@ghostfolio/ui/value';
|
||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
@ -34,7 +33,6 @@ import { Subject, Subscription } from 'rxjs';
|
|||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
GfAssetProfileIconComponent,
|
GfAssetProfileIconComponent,
|
||||||
GfNoTransactionsInfoComponent,
|
|
||||||
GfSymbolModule,
|
GfSymbolModule,
|
||||||
GfValueComponent,
|
GfValueComponent,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
@ -52,7 +50,6 @@ import { Subject, Subscription } from 'rxjs';
|
|||||||
export class GfHoldingsTableComponent implements OnChanges, OnDestroy {
|
export class GfHoldingsTableComponent implements OnChanges, OnDestroy {
|
||||||
@Input() baseCurrency: string;
|
@Input() baseCurrency: string;
|
||||||
@Input() deviceType: string;
|
@Input() deviceType: string;
|
||||||
@Input() hasPermissionToCreateActivity: boolean;
|
|
||||||
@Input() hasPermissionToOpenDetails = true;
|
@Input() hasPermissionToOpenDetails = true;
|
||||||
@Input() hasPermissionToShowValues = true;
|
@Input() hasPermissionToShowValues = true;
|
||||||
@Input() holdings: PortfolioPosition[];
|
@Input() holdings: PortfolioPosition[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user