Browse Source

Merge branch 'main' into task/handle-delisted-asset-profiles-in-fmp-service

pull/7442/head
Thomas Kaul 1 month ago
committed by GitHub
parent
commit
5f8b491f5f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      CHANGELOG.md
  2. 44
      apps/api/src/app/user/user.service.ts
  3. 4391
      apps/api/src/assets/cryptocurrencies/cryptocurrencies.json
  4. 11
      apps/client/src/app/components/access-table/access-table.component.html
  5. 6
      apps/client/src/app/components/access-table/access-table.component.ts

6
CHANGELOG.md

@ -7,14 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Added
- Added a loading indicator to the access table to share the portfolio
### Changed
- Deprecated `firstOrderDate` in favor of `dateOfFirstActivity` in the `GET api/v2/portfolio/performance` endpoint
- Improved the log output in the get asset profile functionality of the _Financial Modeling Prep_ service for delisted asset profiles
- Refreshed the cryptocurrencies list
- Upgraded `prettier` from version `3.8.4` to `3.9.6`
### Fixed
- Resolved an exception in the user service when getting a non-existent user
- Fixed the missing currency in the get quotes functionality of the _Financial Modeling Prep_ service for cryptocurrencies without an asset profile
## 3.34.0 - 2026-07-25

44
apps/api/src/app/user/user.service.ts

@ -231,22 +231,7 @@ export class UserService {
public async user(
userWhereUniqueInput: Prisma.UserWhereUniqueInput
): Promise<UserWithSettings | null> {
const {
_count,
accessesGet,
accessToken,
accounts,
analytics,
authChallenge,
createdAt,
id,
provider,
role,
settings,
subscriptions,
thirdPartyId,
updatedAt
} = await this.prismaService.user.findUnique({
const userFromDatabase = await this.prismaService.user.findUnique({
include: {
_count: {
select: {
@ -264,6 +249,27 @@ export class UserService {
where: userWhereUniqueInput
});
if (!userFromDatabase) {
return null;
}
const {
_count,
accessesGet,
accessToken,
accounts,
analytics,
authChallenge,
createdAt,
id,
provider,
role,
settings,
subscriptions,
thirdPartyId,
updatedAt
} = userFromDatabase;
const activitiesCount = _count?.activities ?? 0;
const user: UserWithSettings = {
@ -283,16 +289,16 @@ export class UserService {
analytics?.dataProviderGhostfolioDailyRequests
};
if (user?.settings) {
if (user.settings) {
if (!user.settings.settings) {
user.settings.settings = {};
}
} else if (user) {
} else {
// Set default settings if needed
user.settings = {
settings: {},
updatedAt: new Date(),
userId: user?.id
userId: user.id
};
}

4391
apps/api/src/assets/cryptocurrencies/cryptocurrencies.json

File diff suppressed because it is too large

11
apps/client/src/app/components/access-table/access-table.component.html

@ -105,3 +105,14 @@
<tr *matRowDef="let row; columns: displayedColumns()" mat-row></tr>
</table>
</div>
@if (isLoading()) {
<ngx-skeleton-loader
animation="pulse"
class="px-4 py-3"
[theme]="{
height: '1.5rem',
width: '100%'
}"
/>
}

6
apps/client/src/app/components/access-table/access-table.component.ts

@ -31,6 +31,7 @@ import {
removeCircleOutline
} from 'ionicons/icons';
import ms from 'ms';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
@ -40,6 +41,7 @@ import ms from 'ms';
MatButtonModule,
MatMenuModule,
MatTableModule,
NgxSkeletonLoaderModule,
RouterModule
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
@ -68,6 +70,10 @@ export class GfAccessTableComponent {
return columns;
});
protected readonly isLoading = computed(() => {
return !this.accesses();
});
private readonly clipboard = inject(Clipboard);
private readonly notificationService = inject(NotificationService);
private readonly snackBar = inject(MatSnackBar);

Loading…
Cancel
Save