Browse Source
Merge branch 'main' into feature/migrate-value-component-to-control-flow
pull/4592/head
Thomas Kaul
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
59 additions and
51 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/data-provider.service.ts
-
libs/ui/src/lib/assistant/assistant.html
|
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Changed |
|
|
|
|
|
|
|
- Renamed `User` to `user` in the `Subscription` database schema |
|
|
|
- Migrated the `@ghostfolio/ui/assistant` component to control flow |
|
|
|
- Migrated the `@ghostfolio/ui/value` component to control flow |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
@ -18,6 +18,7 @@ import { |
|
|
|
DATE_FORMAT, |
|
|
|
getCurrencyFromSymbol, |
|
|
|
getStartOfUtcDate, |
|
|
|
isCurrency, |
|
|
|
isDerivedCurrency |
|
|
|
} from '@ghostfolio/common/helper'; |
|
|
|
import { |
|
|
@ -468,17 +469,21 @@ export class DataProviderService { |
|
|
|
)) { |
|
|
|
const dataProvider = this.getDataProvider(DataSource[dataSource]); |
|
|
|
|
|
|
|
if ( |
|
|
|
const symbols = assetProfileIdentifiers |
|
|
|
.filter(({ symbol }) => { |
|
|
|
if (isCurrency(getCurrencyFromSymbol(symbol))) { |
|
|
|
// Keep non-derived currencies
|
|
|
|
return !isDerivedCurrency(getCurrencyFromSymbol(symbol)); |
|
|
|
} else if ( |
|
|
|
dataProvider.getDataProviderInfo().isPremium && |
|
|
|
this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION') && |
|
|
|
user?.subscription.type === 'Basic' |
|
|
|
) { |
|
|
|
continue; |
|
|
|
// Skip symbols of Premium data providers for users without subscription
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
const symbols = assetProfileIdentifiers |
|
|
|
.filter(({ symbol }) => { |
|
|
|
return !isDerivedCurrency(getCurrencyFromSymbol(symbol)); |
|
|
|
return true; |
|
|
|
}) |
|
|
|
.map(({ symbol }) => { |
|
|
|
return symbol; |
|
|
|
|
|
@ -15,28 +15,26 @@ |
|
|
|
[formControl]="searchFormControl" |
|
|
|
[placeholder]="placeholder" |
|
|
|
/> |
|
|
|
<div |
|
|
|
*ngIf="deviceType !== 'mobile' && !searchFormControl.value" |
|
|
|
class="hot-key-hint mx-1 px-1" |
|
|
|
> |
|
|
|
/ |
|
|
|
</div> |
|
|
|
@if (deviceType !== 'mobile' && !searchFormControl.value) { |
|
|
|
<div class="hot-key-hint mx-1 px-1">/</div> |
|
|
|
} |
|
|
|
@if (searchFormControl.value) { |
|
|
|
<button |
|
|
|
*ngIf="searchFormControl.value" |
|
|
|
class="h-100 no-min-width px-3 rounded-0" |
|
|
|
mat-button |
|
|
|
(click)="initialize()" |
|
|
|
> |
|
|
|
<ion-icon class="m-0" name="close-circle-outline" /> |
|
|
|
</button> |
|
|
|
} @else { |
|
|
|
<button |
|
|
|
*ngIf="!searchFormControl.value" |
|
|
|
class="h-100 no-min-width px-3 rounded-0" |
|
|
|
mat-button |
|
|
|
(click)="onCloseAssistant()" |
|
|
|
> |
|
|
|
<ion-icon class="m-0" name="close-outline" /> |
|
|
|
</button> |
|
|
|
} |
|
|
|
</div> |
|
|
|
<div |
|
|
|
*ngIf="isLoading || searchFormControl.value" |
|
|
@ -51,8 +49,8 @@ |
|
|
|
(clicked)="onCloseAssistant()" |
|
|
|
/> |
|
|
|
<ng-container *ngIf="searchResults?.holdings?.length === 0"> |
|
|
|
@if (isLoading) { |
|
|
|
<ngx-skeleton-loader |
|
|
|
*ngIf="isLoading" |
|
|
|
animation="pulse" |
|
|
|
class="mx-2" |
|
|
|
[theme]="{ |
|
|
@ -60,7 +58,9 @@ |
|
|
|
width: '100%' |
|
|
|
}" |
|
|
|
/> |
|
|
|
<div *ngIf="!isLoading" class="px-2 py-1" i18n>No entries...</div> |
|
|
|
} @else { |
|
|
|
<div class="px-2 py-1" i18n>No entries...</div> |
|
|
|
} |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
<div *ngIf="hasPermissionToAccessAdminControl" class="mt-3"> |
|
|
@ -72,8 +72,8 @@ |
|
|
|
(clicked)="onCloseAssistant()" |
|
|
|
/> |
|
|
|
<ng-container *ngIf="searchResults?.assetProfiles?.length === 0"> |
|
|
|
@if (isLoading) { |
|
|
|
<ngx-skeleton-loader |
|
|
|
*ngIf="isLoading" |
|
|
|
animation="pulse" |
|
|
|
class="mx-2" |
|
|
|
[theme]="{ |
|
|
@ -81,7 +81,9 @@ |
|
|
|
width: '100%' |
|
|
|
}" |
|
|
|
/> |
|
|
|
<div *ngIf="!isLoading" class="px-2 py-1" i18n>No entries...</div> |
|
|
|
} @else { |
|
|
|
<div class="px-2 py-1" i18n>No entries...</div> |
|
|
|
} |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|