|
|
@ -17,32 +17,41 @@ |
|
|
|
> |
|
|
|
<mat-option class="line-height-1" value="BUY"> |
|
|
|
<span><b>{{ typesTranslationMap['BUY'] }}</b></span> |
|
|
|
<br /> |
|
|
|
<small class="text-muted text-nowrap" i18n |
|
|
|
<small class="d-block line-height-1 text-muted text-nowrap" i18n |
|
|
|
>Stocks, ETFs, bonds, cryptocurrencies, commodities</small |
|
|
|
> |
|
|
|
</mat-option> |
|
|
|
<mat-option |
|
|
|
*ngIf="data.user?.settings?.isExperimentalFeatures" |
|
|
|
class="line-height-1" |
|
|
|
value="FEE" |
|
|
|
> |
|
|
|
<span><b>{{ typesTranslationMap['FEE'] }}</b></span> |
|
|
|
<small class="d-block line-height-1 text-muted text-nowrap" i18n |
|
|
|
>One-time fee, annual account fees</small |
|
|
|
> |
|
|
|
</mat-option> |
|
|
|
<mat-option class="line-height-1" value="DIVIDEND"> |
|
|
|
<span><b>{{ typesTranslationMap['DIVIDEND'] }}</b></span> |
|
|
|
<small class="d-block line-height-1 text-muted text-nowrap" i18n |
|
|
|
>Distribution of corporate earnings</small |
|
|
|
> |
|
|
|
</mat-option> |
|
|
|
<mat-option class="line-height-1" value="LIABILITY"> |
|
|
|
<span><b>{{ typesTranslationMap['LIABILITY'] }}</b></span> |
|
|
|
<br /> |
|
|
|
<small class="text-muted text-nowrap" i18n |
|
|
|
<small class="d-block line-height-1 text-muted text-nowrap" i18n |
|
|
|
>Mortgages, personal loans, credit cards</small |
|
|
|
> |
|
|
|
</mat-option> |
|
|
|
<mat-option class="line-height-1" value="SELL"> |
|
|
|
<span><b>{{ typesTranslationMap['SELL'] }}</b></span> |
|
|
|
<br /> |
|
|
|
<small class="text-muted text-nowrap" i18n |
|
|
|
<small class="d-block line-height-1 text-muted text-nowrap" i18n |
|
|
|
>Stocks, ETFs, bonds, cryptocurrencies, commodities</small |
|
|
|
> |
|
|
|
</mat-option> |
|
|
|
<mat-option class="line-height-1" value="ITEM"> |
|
|
|
<span><b>{{ typesTranslationMap['ITEM'] }}</b></span> |
|
|
|
<br /> |
|
|
|
<small class="text-muted text-nowrap" i18n |
|
|
|
<small class="d-block line-height-1 text-muted text-nowrap" i18n |
|
|
|
>Luxury items, real estate, private companies</small |
|
|
|
> |
|
|
|
</mat-option> |
|
|
@ -125,14 +134,18 @@ |
|
|
|
</div> |
|
|
|
<div |
|
|
|
class="mb-3" |
|
|
|
[ngClass]="{ 'd-none': activityForm.controls['type']?.value === 'ITEM' || activityForm.controls['type']?.value === 'LIABILITY' }" |
|
|
|
[ngClass]="{ 'd-none': activityForm.controls['type']?.value === 'FEE' || activityForm.controls['type']?.value === 'ITEM' || activityForm.controls['type']?.value === 'LIABILITY' }" |
|
|
|
> |
|
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
|
<mat-label i18n>Quantity</mat-label> |
|
|
|
<input formControlName="quantity" matInput type="number" /> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<div class="align-items-start d-flex mb-3"> |
|
|
|
<div |
|
|
|
class="mb-3" |
|
|
|
[ngClass]="{ 'd-none': activityForm.controls['type']?.value === 'FEE' }" |
|
|
|
> |
|
|
|
<div class="align-items-start d-flex"> |
|
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
|
<mat-label |
|
|
|
><ng-container [ngSwitch]="activityForm.controls['type']?.value"> |
|
|
@ -140,7 +153,9 @@ |
|
|
|
>Dividend</ng-container |
|
|
|
> |
|
|
|
<ng-container *ngSwitchCase="'ITEM'" i18n>Value</ng-container> |
|
|
|
<ng-container *ngSwitchCase="'LIABILITY'" i18n>Value</ng-container> |
|
|
|
<ng-container *ngSwitchCase="'LIABILITY'" i18n |
|
|
|
>Value</ng-container |
|
|
|
> |
|
|
|
<ng-container *ngSwitchDefault i18n>Unit Price</ng-container> |
|
|
|
</ng-container> |
|
|
|
</mat-label> |
|
|
@ -155,7 +170,10 @@ |
|
|
|
[ngClass]="{ 'd-none': !activityForm.controls['currency']?.value }" |
|
|
|
> |
|
|
|
<mat-select formControlName="currencyOfUnitPrice"> |
|
|
|
<mat-option *ngFor="let currency of currencies" [value]="currency"> |
|
|
|
<mat-option |
|
|
|
*ngFor="let currency of currencies" |
|
|
|
[value]="currency" |
|
|
|
> |
|
|
|
{{ currency }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
@ -163,7 +181,8 @@ |
|
|
|
<mat-error |
|
|
|
*ngIf="activityForm.controls['unitPriceInCustomCurrency'].hasError('invalid')" |
|
|
|
><ng-container i18n |
|
|
|
>Oops! Could not get the historical exchange rate from</ng-container |
|
|
|
>Oops! Could not get the historical exchange rate |
|
|
|
from</ng-container |
|
|
|
> |
|
|
|
{{ activityForm.controls['date']?.value | date: defaultDateFormat |
|
|
|
}}</mat-error |
|
|
@ -180,6 +199,7 @@ |
|
|
|
<ion-icon class="text-muted" name="refresh-outline"></ion-icon> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="d-none"> |
|
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
|
<mat-label |
|
|
@ -187,6 +207,7 @@ |
|
|
|
<ng-container *ngSwitchCase="'DIVIDEND'" i18n |
|
|
|
>Dividend</ng-container |
|
|
|
> |
|
|
|
<ng-container *ngSwitchCase="'FEE'" i18n>Value</ng-container> |
|
|
|
<ng-container *ngSwitchCase="'ITEM'" i18n>Value</ng-container> |
|
|
|
<ng-container *ngSwitchCase="'LIABILITY'" i18n>Value</ng-container> |
|
|
|
<ng-container *ngSwitchDefault i18n>Unit Price</ng-container> |
|
|
|