mirror of https://github.com/ghostfolio/ghostfolio
committed by
GitHub
65 changed files with 777 additions and 480 deletions
@ -1,132 +1,142 @@ |
|||||
<div mat-dialog-title>{{ data.categoryName }} › {{ data.rule.name }}</div> |
<div mat-dialog-title>{{ data.categoryName }} › {{ data.rule.name }}</div> |
||||
|
|
||||
<div class="py-3" mat-dialog-content> |
<form |
||||
@if ( |
class="d-flex flex-column h-100" |
||||
data.rule.configuration.thresholdMin && data.rule.configuration.thresholdMax |
[formGroup]="settingsForm" |
||||
) { |
(ngSubmit)="onSubmit()" |
||||
<div class="w-100"> |
> |
||||
<h6 class="d-flex mb-0"> |
<div class="py-3" mat-dialog-content> |
||||
<ng-container i18n>Threshold range</ng-container>: |
@if ( |
||||
<gf-value |
data.rule.configuration.thresholdMin && |
||||
class="ml-1" |
data.rule.configuration.thresholdMax |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
) { |
||||
[locale]="data.locale" |
<div class="w-100"> |
||||
[precision]="2" |
<h6 class="d-flex mb-0"> |
||||
[value]="data.settings.thresholdMin" |
<ng-container i18n>Threshold range</ng-container>: |
||||
/> |
<gf-value |
||||
<span class="mx-1">-</span> |
class="ml-1" |
||||
<gf-value |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[precision]="2" |
||||
[precision]="2" |
[value]="settingsForm.get('thresholdMin').value" |
||||
[value]="data.settings.thresholdMax" |
/> |
||||
/> |
<span class="mx-1">-</span> |
||||
</h6> |
<gf-value |
||||
<div class="align-items-center d-flex w-100"> |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
<gf-value |
[locale]="data.locale" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[precision]="2" |
||||
[locale]="data.locale" |
[value]="settingsForm.get('thresholdMax').value" |
||||
[precision]="2" |
/> |
||||
[value]="data.rule.configuration.threshold.min" |
</h6> |
||||
/> |
<div class="align-items-center d-flex w-100"> |
||||
<mat-slider |
<gf-value |
||||
class="flex-grow-1" |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
[max]="data.rule.configuration.threshold.max" |
[locale]="data.locale" |
||||
[min]="data.rule.configuration.threshold.min" |
[precision]="2" |
||||
[step]="data.rule.configuration.threshold.step" |
[value]="data.rule.configuration.threshold.min" |
||||
> |
/> |
||||
<input matSliderStartThumb [(ngModel)]="data.settings.thresholdMin" /> |
<mat-slider |
||||
<input matSliderEndThumb [(ngModel)]="data.settings.thresholdMax" /> |
class="flex-grow-1" |
||||
</mat-slider> |
[max]="data.rule.configuration.threshold.max" |
||||
<gf-value |
[min]="data.rule.configuration.threshold.min" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[step]="data.rule.configuration.threshold.step" |
||||
[locale]="data.locale" |
> |
||||
[precision]="2" |
<input formControlName="thresholdMin" matSliderStartThumb /> |
||||
[value]="data.rule.configuration.threshold.max" |
<input formControlName="thresholdMax" matSliderEndThumb /> |
||||
/> |
</mat-slider> |
||||
|
<gf-value |
||||
|
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
|
[locale]="data.locale" |
||||
|
[precision]="2" |
||||
|
[value]="data.rule.configuration.threshold.max" |
||||
|
/> |
||||
|
</div> |
||||
</div> |
</div> |
||||
</div> |
} @else { |
||||
} @else { |
<div class="w-100" [class.d-none]="!data.rule.configuration.thresholdMin"> |
||||
<div class="w-100" [class.d-none]="!data.rule.configuration.thresholdMin"> |
<h6 class="d-flex mb-0"> |
||||
<h6 class="d-flex mb-0"> |
<ng-container i18n>Threshold Min</ng-container>: |
||||
<ng-container i18n>Threshold Min</ng-container>: |
<gf-value |
||||
<gf-value |
class="ml-1" |
||||
class="ml-1" |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[precision]="2" |
||||
[precision]="2" |
[value]="settingsForm.get('thresholdMin').value" |
||||
[value]="data.settings.thresholdMin" |
/> |
||||
/> |
</h6> |
||||
</h6> |
<div class="align-items-center d-flex w-100"> |
||||
<div class="align-items-center d-flex w-100"> |
<gf-value |
||||
<gf-value |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[precision]="2" |
||||
[precision]="2" |
[value]="data.rule.configuration.threshold.min" |
||||
[value]="data.rule.configuration.threshold.min" |
/> |
||||
/> |
<mat-slider |
||||
<mat-slider |
class="flex-grow-1" |
||||
class="flex-grow-1" |
name="thresholdMin" |
||||
name="thresholdMin" |
[max]="data.rule.configuration.threshold.max" |
||||
[max]="data.rule.configuration.threshold.max" |
[min]="data.rule.configuration.threshold.min" |
||||
[min]="data.rule.configuration.threshold.min" |
[step]="data.rule.configuration.threshold.step" |
||||
[step]="data.rule.configuration.threshold.step" |
> |
||||
> |
<input formControlName="thresholdMin" matSliderThumb /> |
||||
<input matSliderThumb [(ngModel)]="data.settings.thresholdMin" /> |
</mat-slider> |
||||
</mat-slider> |
<gf-value |
||||
<gf-value |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[precision]="2" |
||||
[precision]="2" |
[value]="data.rule.configuration.threshold.max" |
||||
[value]="data.rule.configuration.threshold.max" |
/> |
||||
/> |
</div> |
||||
</div> |
</div> |
||||
</div> |
<div class="w-100" [class.d-none]="!data.rule.configuration.thresholdMax"> |
||||
<div class="w-100" [class.d-none]="!data.rule.configuration.thresholdMax"> |
<h6 class="d-flex mb-0"> |
||||
<h6 class="d-flex mb-0"> |
<ng-container i18n>Threshold Max</ng-container>: |
||||
<ng-container i18n>Threshold Max</ng-container>: |
<gf-value |
||||
<gf-value |
class="ml-1" |
||||
class="ml-1" |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[precision]="2" |
||||
[precision]="2" |
[value]="settingsForm.get('thresholdMax').value" |
||||
[value]="data.settings.thresholdMax" |
/> |
||||
/> |
</h6> |
||||
</h6> |
<div class="align-items-center d-flex w-100"> |
||||
<div class="align-items-center d-flex w-100"> |
<gf-value |
||||
<gf-value |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[precision]="2" |
||||
[precision]="2" |
[value]="data.rule.configuration.threshold.min" |
||||
[value]="data.rule.configuration.threshold.min" |
/> |
||||
/> |
<mat-slider |
||||
<mat-slider |
class="flex-grow-1" |
||||
class="flex-grow-1" |
name="thresholdMax" |
||||
name="thresholdMax" |
[max]="data.rule.configuration.threshold.max" |
||||
[max]="data.rule.configuration.threshold.max" |
[min]="data.rule.configuration.threshold.min" |
||||
[min]="data.rule.configuration.threshold.min" |
[step]="data.rule.configuration.threshold.step" |
||||
[step]="data.rule.configuration.threshold.step" |
> |
||||
> |
<input formControlName="thresholdMax" matSliderThumb /> |
||||
<input matSliderThumb [(ngModel)]="data.settings.thresholdMax" /> |
</mat-slider> |
||||
</mat-slider> |
<gf-value |
||||
<gf-value |
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
||||
[isPercent]="data.rule.configuration.threshold.unit === '%'" |
[locale]="data.locale" |
||||
[locale]="data.locale" |
[precision]="2" |
||||
[precision]="2" |
[value]="data.rule.configuration.threshold.max" |
||||
[value]="data.rule.configuration.threshold.max" |
/> |
||||
/> |
</div> |
||||
</div> |
</div> |
||||
</div> |
} |
||||
} |
</div> |
||||
</div> |
|
||||
|
|
||||
<div align="end" mat-dialog-actions> |
<div align="end" mat-dialog-actions> |
||||
<button i18n mat-button (click)="dialogRef.close()">Close</button> |
<button mat-button type="button" (click)="dialogRef.close()"> |
||||
<button |
<ng-container i18n>Close</ng-container> |
||||
color="primary" |
</button> |
||||
mat-flat-button |
<button |
||||
(click)="dialogRef.close(data.settings)" |
color="primary" |
||||
> |
mat-flat-button |
||||
<ng-container i18n>Save</ng-container> |
type="submit" |
||||
</button> |
[disabled]="!settingsForm.dirty" |
||||
</div> |
> |
||||
|
<ng-container i18n>Save</ng-container> |
||||
|
</button> |
||||
|
</div> |
||||
|
</form> |
||||
|
|||||
@ -1,4 +1,6 @@ |
|||||
export interface LineChartItem { |
export interface LineChartItem<T = number> { |
||||
date: string; |
date: string; |
||||
value: number; |
value: T; |
||||
} |
} |
||||
|
|
||||
|
export type NullableLineChartItem = LineChartItem<number | null>; |
||||
|
|||||
@ -0,0 +1,3 @@ |
|||||
|
export interface ReferralPartner { |
||||
|
name: string; |
||||
|
} |
||||
@ -1,6 +1,11 @@ |
|||||
export interface TabConfiguration { |
interface BaseTabConfiguration { |
||||
iconName: string; |
iconName: string; |
||||
label: string; |
label: string; |
||||
routerLink: string[]; |
|
||||
showCondition?: boolean; |
showCondition?: boolean; |
||||
} |
} |
||||
|
|
||||
|
export type TabConfiguration = BaseTabConfiguration & |
||||
|
( |
||||
|
| { onClick: () => void; routerLink?: never } |
||||
|
| { onClick?: never; routerLink: string[] } |
||||
|
); |
||||
|
|||||
@ -0,0 +1,5 @@ |
|||||
|
import { AssetProfileIdentifier } from '@ghostfolio/common/interfaces'; |
||||
|
|
||||
|
export type PortfolioProportionChartClickEvent = |
||||
|
| AssetProfileIdentifier |
||||
|
| { accountId: string }; |
||||
Loading…
Reference in new issue