Browse Source

Merge branch 'main' into bugfix/start-date-of-date-range-filter-of-activities

pull/8118/head
Thomas Kaul 1 day ago
committed by GitHub
parent
commit
ec28b897e9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      CHANGELOG.md
  2. 2
      apps/api/src/app/import/import.service.spec.ts
  3. 16
      apps/api/src/app/import/import.service.ts
  4. 2
      apps/client/src/app/components/admin-users/admin-users.component.ts
  5. 2
      apps/client/src/app/components/admin-users/admin-users.html
  6. 4
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
  7. 2
      apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts
  8. 4
      apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html
  9. 9
      libs/ui/src/lib/i18n.ts

6
CHANGELOG.md

@ -11,9 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support to paste a file in the import activities dialog
### Changed
- Improved the labels of the client of the last request in the users section of the admin control panel
### Fixed
- Fixed the missing platform icon in the preview step of the activities import
- Fixed the start date of the date range filter on the activities page and in the dividend timeline chart on the analysis page
- Fixed the link of the _Manage Asset Profile_ button in the holding detail dialog before the holding has loaded
## 3.85.0 - 2026-10-12

2
apps/api/src/app/import/import.service.spec.ts

@ -69,7 +69,7 @@ describe('ImportService', () => {
importService = new ImportService(
{
getAccounts: jest.fn().mockResolvedValue([])
accounts: jest.fn().mockResolvedValue([])
} as unknown as AccountService,
{
createActivity,

16
apps/api/src/app/import/import.service.ts

@ -38,6 +38,7 @@ import {
} from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import {
AccountWithPlatform,
AccountWithValue,
OrderWithAccount,
UserWithSettings
@ -769,11 +770,14 @@ export class ImportService {
userId: user.id
});
const accounts = (await this.accountService.getAccounts(user.id)).map(
({ id, name }) => {
return { id, name };
}
);
const accounts: Pick<AccountWithPlatform, 'id' | 'name' | 'platform'>[] = (
await this.accountService.accounts({
include: { platform: true },
where: { userId: user.id }
})
).map(({ id, name, platform }) => {
return { id, name, platform };
});
if (isDryRun) {
accountsWithBalancesDto
@ -888,7 +892,7 @@ export class ImportService {
let order:
| OrderWithAccount
| (Omit<OrderWithAccount, 'account' | 'SymbolProfile' | 'tags'> & {
account?: { id: string; name: string };
account?: Pick<AccountWithPlatform, 'id' | 'name' | 'platform'>;
tags?: { id: string; name: string }[];
});

2
apps/client/src/app/components/admin-users/admin-users.component.ts

@ -22,6 +22,7 @@ import {
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { internalRoutes } from '@ghostfolio/common/routes/routes';
import { RequestClient } from '@ghostfolio/prisma/enums';
import { translate } from '@ghostfolio/ui/i18n';
import { NotificationService } from '@ghostfolio/ui/notifications';
import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator';
import { AdminService, DataService } from '@ghostfolio/ui/services';
@ -114,6 +115,7 @@ export class GfAdminUsersComponent implements OnInit {
internalRoutes.adminControl.subRoutes.users.routerLink;
protected totalItems = 0;
protected readonly translate = translate;
protected user: User;
private readonly deviceType = computed(

2
apps/client/src/app/components/admin-users/admin-users.html

@ -197,7 +197,7 @@
<ion-icon
class="mr-1"
[name]="requestClientIcons[element.lastRequestClient]"
[title]="element.lastRequestClient"
[title]="translate(element.lastRequestClient)"
/>
} @else {
<ion-icon class="hidden mr-1" />

4
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html

@ -483,8 +483,8 @@
mat-stroked-button
[routerLink]="
routerLinkAdminControlMarketDataUpdate(
assetProfile?.dataSource,
assetProfile?.symbol
assetProfile?.dataSource ?? data.dataSource,
assetProfile?.symbol ?? data.symbol
)
"
(click)="onClose()"

2
apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts

@ -6,6 +6,7 @@ import {
} from '@ghostfolio/common/helper';
import { AdminUserResponse } from '@ghostfolio/common/interfaces';
import type { Subscription } from '@ghostfolio/prisma/browser';
import { translate } from '@ghostfolio/ui/i18n';
import { AdminService, DataService } from '@ghostfolio/ui/services';
import { GfValueComponent } from '@ghostfolio/ui/value';
@ -70,6 +71,7 @@ export class GfUserDetailDialogComponent implements OnInit {
'expiresAt'
];
protected readonly translate = translate;
protected user: AdminUserResponse;
protected readonly data = inject<UserDetailDialogParams>(MAT_DIALOG_DATA);

4
apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html

@ -174,7 +174,9 @@
i18n
size="medium"
[isLoading]="isLoading"
[value]="user?.lastRequestClient || '-'"
[value]="
user?.lastRequestClient ? translate(user.lastRequestClient) : '-'
"
>Client</gf-value
>
</div>

9
libs/ui/src/lib/i18n.ts

@ -3,6 +3,7 @@ import type {
ProductPlatform,
SectorName
} from '@ghostfolio/common/types';
import { RequestClient } from '@ghostfolio/prisma/enums';
import '@angular/localize/init';
@ -121,9 +122,15 @@ const locales = {
LINUX: 'Linux',
MACOS: 'macOS',
WEB: $localize`Web`,
WINDOWS: 'Windows'
WINDOWS: 'Windows',
// Request clients (WEB is defined above under Product platforms)
API: 'API',
MCP: 'MCP',
SELF_HOSTING: $localize`Self-Hosting`
} satisfies Record<ProductCategory, string> &
Record<ProductPlatform, string> &
Record<RequestClient, string> &
Record<SectorName, string> &
Record<string, string>;

Loading…
Cancel
Save