Browse Source
Task/show AI-assisted import checkbox to Basic users (#8309)
* Extend visibility of AI-assisted import to users without a subscription
pull/8314/head
Thomas Kaul
3 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
19 additions and
10 deletions
-
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts
-
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html
|
|
|
@ -26,6 +26,7 @@ import { |
|
|
|
FileFormat, |
|
|
|
GfFileDropAreaComponent |
|
|
|
} from '@ghostfolio/ui/file-drop-area'; |
|
|
|
import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; |
|
|
|
import { DataService } from '@ghostfolio/ui/services'; |
|
|
|
|
|
|
|
import { |
|
|
|
@ -90,6 +91,7 @@ import { |
|
|
|
GfDialogFooterComponent, |
|
|
|
GfDialogHeaderComponent, |
|
|
|
GfFileDropAreaComponent, |
|
|
|
GfPremiumIndicatorComponent, |
|
|
|
IonIcon, |
|
|
|
MatButtonModule, |
|
|
|
MatCheckboxModule, |
|
|
|
|
|
|
|
@ -82,17 +82,23 @@ |
|
|
|
(fileSelected)="onFileSelected({ stepper, file: $event })" |
|
|
|
/> |
|
|
|
@if ( |
|
|
|
data.deviceType !== 'mobile' && hasPermissionToEnableGhostfolioAi |
|
|
|
data.deviceType !== 'mobile' && |
|
|
|
(hasPermissionToEnableGhostfolioAi || |
|
|
|
(data.user?.subscription?.type === 'Basic' && |
|
|
|
data.user?.settings?.isExperimentalFeatures)) |
|
|
|
) { |
|
|
|
<div class="align-items-center d-flex mt-4"> |
|
|
|
<mat-checkbox |
|
|
|
color="primary" |
|
|
|
[checked]="isGhostfolioAiEnabled" |
|
|
|
[disabled]="isLoading" |
|
|
|
[disabled]="isLoading || !hasPermissionToEnableGhostfolioAi" |
|
|
|
(change)="onGhostfolioAiChange($event)" |
|
|
|
> |
|
|
|
<ng-container i18n>AI-assisted import</ng-container> |
|
|
|
</mat-checkbox> |
|
|
|
@if (data.user?.subscription?.type === 'Basic') { |
|
|
|
<gf-premium-indicator class="ms-1" [enableLink]="false" /> |
|
|
|
} @else { |
|
|
|
<span |
|
|
|
class="align-items-center d-flex ms-1" |
|
|
|
matTooltipPosition="above" |
|
|
|
@ -101,6 +107,7 @@ |
|
|
|
> |
|
|
|
<ion-icon name="information-circle-outline" /> |
|
|
|
</span> |
|
|
|
} |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
|