mirror of https://github.com/ghostfolio/ghostfolio
4 changed files with 157 additions and 127 deletions
@ -1,112 +1,129 @@ |
|||||
<gf-dialog-header |
<form |
||||
mat-dialog-title |
class="d-flex flex-column h-100" |
||||
position="center" |
[formGroup]="assetProfileForm" |
||||
[deviceType]="data.deviceType" |
(keyup.enter)="assetProfileForm.valid && onSubmit()" |
||||
[title]="assetProfile?.name ?? data.symbol" |
(ngSubmit)="onSubmit()" |
||||
(closeButtonClicked)="onClose()" |
> |
||||
></gf-dialog-header> |
<h1 mat-dialog-title>{{ assetProfile?.name ?? data.symbol }}</h1> |
||||
|
<div class="flex-grow-1" mat-dialog-content> |
||||
<div class="flex-grow-1" mat-dialog-content> |
<gf-admin-market-data-detail |
||||
<gf-admin-market-data-detail |
class="mb-3" |
||||
class="mb-3" |
[dataSource]="data.dataSource" |
||||
[dataSource]="data.dataSource" |
[dateOfFirstActivity]="data.dateOfFirstActivity" |
||||
[dateOfFirstActivity]="data.dateOfFirstActivity" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[marketData]="marketDataDetails" |
||||
[marketData]="marketDataDetails" |
[symbol]="data.symbol" |
||||
[symbol]="data.symbol" |
(marketDataChanged)="onMarketDataChanged($event)" |
||||
(marketDataChanged)="onMarketDataChanged($event)" |
></gf-admin-market-data-detail> |
||||
></gf-admin-market-data-detail> |
<div class="row"> |
||||
<div class="row"> |
<div class="col-6 mb-3"> |
||||
<div class="col-6 mb-3"> |
<gf-value |
||||
<gf-value |
i18n |
||||
i18n |
size="medium" |
||||
size="medium" |
[isDate]="data.dateOfFirstActivity ? true : false" |
||||
[isDate]="data.dateOfFirstActivity ? true : false" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[value]="data.dateOfFirstActivity ?? '-'" |
||||
[value]="data.dateOfFirstActivity ?? '-'" |
>First Buy Date</gf-value |
||||
>First Buy Date</gf-value |
> |
||||
> |
</div> |
||||
</div> |
<div class="col-6 mb-3"> |
||||
<div class="col-6 mb-3"> |
<gf-value |
||||
<gf-value |
i18n |
||||
i18n |
size="medium" |
||||
size="medium" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[value]="assetProfile?.activitiesCount ?? 0" |
||||
[value]="assetProfile?.activitiesCount ?? 0" |
>Transactions</gf-value |
||||
>Transactions</gf-value |
> |
||||
> |
</div> |
||||
</div> |
<div class="col-6 mb-3"> |
||||
<div class="col-6 mb-3"> |
<gf-value |
||||
<gf-value |
i18n |
||||
i18n |
size="medium" |
||||
size="medium" |
[hidden]="!assetProfile?.assetClass" |
||||
[hidden]="!assetProfile?.assetClass" |
[value]="assetProfile?.assetClass" |
||||
[value]="assetProfile?.assetClass" |
>Asset Class</gf-value |
||||
>Asset Class</gf-value |
> |
||||
> |
</div> |
||||
</div> |
<div class="col-6 mb-3"> |
||||
<div class="col-6 mb-3"> |
<gf-value |
||||
<gf-value |
i18n |
||||
i18n |
size="medium" |
||||
size="medium" |
[hidden]="!assetProfile?.assetSubClass" |
||||
[hidden]="!assetProfile?.assetSubClass" |
[value]="assetProfile?.assetSubClass" |
||||
[value]="assetProfile?.assetSubClass" |
>Asset Sub Class</gf-value |
||||
>Asset Sub Class</gf-value |
> |
||||
> |
</div> |
||||
</div> |
|
||||
<ng-container |
|
||||
*ngIf="assetProfile?.countries?.length > 0 || assetProfile?.sectors?.length > 0" |
|
||||
> |
|
||||
<ng-container |
<ng-container |
||||
*ngIf="assetProfile?.countries?.length === 1 && assetProfile?.sectors?.length === 1; else charts" |
*ngIf="assetProfile?.countries?.length > 0 || assetProfile?.sectors?.length > 0" |
||||
> |
> |
||||
<div *ngIf="assetProfile?.sectors?.length === 1" class="col-6 mb-3"> |
<ng-container |
||||
<gf-value |
*ngIf="assetProfile?.countries?.length === 1 && assetProfile?.sectors?.length === 1; else charts" |
||||
i18n |
> |
||||
size="medium" |
<div *ngIf="assetProfile?.sectors?.length === 1" class="col-6 mb-3"> |
||||
[locale]="data.locale" |
<gf-value |
||||
[value]="assetProfile?.sectors[0].name" |
i18n |
||||
>Sector</gf-value |
size="medium" |
||||
> |
[locale]="data.locale" |
||||
</div> |
[value]="assetProfile?.sectors[0].name" |
||||
<div *ngIf="assetProfile?.countries?.length === 1" class="col-6 mb-3"> |
>Sector</gf-value |
||||
<gf-value |
> |
||||
i18n |
</div> |
||||
size="medium" |
<div *ngIf="assetProfile?.countries?.length === 1" class="col-6 mb-3"> |
||||
[locale]="data.locale" |
<gf-value |
||||
[value]="assetProfile?.countries[0].name" |
i18n |
||||
>Country</gf-value |
size="medium" |
||||
> |
[locale]="data.locale" |
||||
</div> |
[value]="assetProfile?.countries[0].name" |
||||
|
>Country</gf-value |
||||
|
> |
||||
|
</div> |
||||
|
</ng-container> |
||||
|
<ng-template #charts> |
||||
|
<div class="col-md-6 mb-3"> |
||||
|
<div class="h5" i18n>Sectors</div> |
||||
|
<gf-portfolio-proportion-chart |
||||
|
[colorScheme]="data.colorScheme" |
||||
|
[isInPercent]="true" |
||||
|
[keys]="['name']" |
||||
|
[maxItems]="10" |
||||
|
[positions]="sectors" |
||||
|
></gf-portfolio-proportion-chart> |
||||
|
</div> |
||||
|
<div class="col-md-6 mb-3"> |
||||
|
<div class="h5" i18n>Countries</div> |
||||
|
<gf-portfolio-proportion-chart |
||||
|
[colorScheme]="data.colorScheme" |
||||
|
[isInPercent]="true" |
||||
|
[keys]="['name']" |
||||
|
[maxItems]="10" |
||||
|
[positions]="countries" |
||||
|
></gf-portfolio-proportion-chart> |
||||
|
</div> |
||||
|
</ng-template> |
||||
</ng-container> |
</ng-container> |
||||
<ng-template #charts> |
</div> |
||||
<div class="col-md-6 mb-3"> |
<div class="mt-3"> |
||||
<div class="h5" i18n>Sectors</div> |
<mat-form-field appearance="outline" class="w-100"> |
||||
<gf-portfolio-proportion-chart |
<mat-label i18n>Symbol Mapping</mat-label> |
||||
[colorScheme]="data.colorScheme" |
<textarea |
||||
[isInPercent]="true" |
cdkTextareaAutosize |
||||
[keys]="['name']" |
formControlName="symbolMapping" |
||||
[maxItems]="10" |
matInput |
||||
[positions]="sectors" |
type="text" |
||||
></gf-portfolio-proportion-chart> |
></textarea> |
||||
</div> |
</mat-form-field> |
||||
<div class="col-md-6 mb-3"> |
</div> |
||||
<div class="h5" i18n>Countries</div> |
|
||||
<gf-portfolio-proportion-chart |
|
||||
[colorScheme]="data.colorScheme" |
|
||||
[isInPercent]="true" |
|
||||
[keys]="['name']" |
|
||||
[maxItems]="10" |
|
||||
[positions]="countries" |
|
||||
></gf-portfolio-proportion-chart> |
|
||||
</div> |
|
||||
</ng-template> |
|
||||
</ng-container> |
|
||||
</div> |
</div> |
||||
</div> |
|
||||
|
|
||||
<gf-dialog-footer |
<div class="d-flex justify-content-end" mat-dialog-actions> |
||||
mat-dialog-actions |
<button i18n mat-button type="button" (click)="onClose()">Cancel</button> |
||||
[deviceType]="data.deviceType" |
<button |
||||
(closeButtonClicked)="onClose()" |
color="primary" |
||||
></gf-dialog-footer> |
mat-flat-button |
||||
|
type="submit" |
||||
|
[disabled]="!(assetProfileForm.dirty && assetProfileForm.valid)" |
||||
|
> |
||||
|
<ng-container i18n>Save</ng-container> |
||||
|
</button> |
||||
|
</div> |
||||
|
</form> |
||||
|
Loading…
Reference in new issue