|
|
@ -391,24 +391,87 @@ |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
@if (assetProfile?.dataSource === 'MANUAL') { |
|
|
@if (assetProfile?.dataSource === 'MANUAL') { |
|
|
<div class="mb-3"> |
|
|
<div> |
|
|
<mat-accordion class="my-3"> |
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
<mat-expansion-panel |
|
|
<mat-label i18n>Sectors</mat-label> |
|
|
class="shadow-none" |
|
|
<textarea |
|
|
[expanded]=" |
|
|
cdkTextareaAutosize |
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
formControlName="sectors" |
|
|
.selector.value !== '' && |
|
|
matInput |
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
type="text" |
|
|
.url.value !== '' |
|
|
></textarea> |
|
|
" |
|
|
</mat-form-field> |
|
|
(closed)="scraperConfiguationIsExpanded.set(false)" |
|
|
</div> |
|
|
(opened)="scraperConfiguationIsExpanded.set(true)" |
|
|
<div> |
|
|
> |
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
<mat-expansion-panel-header class="p-0 pr-3"> |
|
|
<mat-label i18n>Countries</mat-label> |
|
|
<mat-panel-title class="font-weight-bold" i18n |
|
|
<textarea |
|
|
>Scraper Configuration</mat-panel-title |
|
|
cdkTextareaAutosize |
|
|
> |
|
|
formControlName="countries" |
|
|
</mat-expansion-panel-header> |
|
|
matInput |
|
|
|
|
|
type="text" |
|
|
|
|
|
></textarea> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
|
|
|
<div> |
|
|
|
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
|
|
|
<mat-label i18n>Url</mat-label> |
|
|
|
|
|
<input formControlName="url" matInput type="text" /> |
|
|
|
|
|
@if (assetProfileForm.get('url').value) { |
|
|
|
|
|
<gf-entity-logo |
|
|
|
|
|
class="mr-3" |
|
|
|
|
|
matSuffix |
|
|
|
|
|
[url]="assetProfileForm.get('url').value" |
|
|
|
|
|
/> |
|
|
|
|
|
} |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="mt-3"> |
|
|
|
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
|
|
|
<mat-label i18n>Note</mat-label> |
|
|
|
|
|
<textarea |
|
|
|
|
|
cdkAutosizeMinRows="2" |
|
|
|
|
|
cdkTextareaAutosize |
|
|
|
|
|
formControlName="comment" |
|
|
|
|
|
matInput |
|
|
|
|
|
(keyup.enter)="$event.stopPropagation()" |
|
|
|
|
|
></textarea> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
</form> |
|
|
|
|
|
</div> |
|
|
|
|
|
</mat-tab> |
|
|
|
|
|
<mat-tab> |
|
|
|
|
|
<ng-template mat-tab-label> |
|
|
|
|
|
<ion-icon name="server-outline" /> |
|
|
|
|
|
<div class="d-none d-sm-block ml-2" i18n>Historical Market Data</div> |
|
|
|
|
|
</ng-template> |
|
|
|
|
|
<div class="container mt-3 p-0"> |
|
|
|
|
|
<div class="no-gutters row w-100"> |
|
|
|
|
|
<div class="col-12"> |
|
|
|
|
|
<gf-historical-market-data-editor |
|
|
|
|
|
[currency]="assetProfile?.currency" |
|
|
|
|
|
[dataSource]="data.dataSource" |
|
|
|
|
|
[dateOfFirstActivity]="assetProfile?.dateOfFirstActivity" |
|
|
|
|
|
[locale]="data.locale" |
|
|
|
|
|
[marketData]="marketDataItems" |
|
|
|
|
|
[symbol]="data.symbol" |
|
|
|
|
|
[user]="user" |
|
|
|
|
|
(marketDataChanged)="onMarketDataChanged($event)" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</mat-tab> |
|
|
|
|
|
@if (assetProfile?.dataSource === 'MANUAL') { |
|
|
|
|
|
<mat-tab> |
|
|
|
|
|
<ng-template mat-tab-label> |
|
|
|
|
|
<ion-icon name="reader-outline" /> |
|
|
|
|
|
<div class="d-none d-sm-block ml-2" i18n>Scraper Configuration</div> |
|
|
|
|
|
</ng-template> |
|
|
|
|
|
<div class="container mt-3 p-0"> |
|
|
|
|
|
<form [formGroup]="assetProfileForm"> |
|
|
<div formGroupName="scraperConfiguration"> |
|
|
<div formGroupName="scraperConfiguration"> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
<mat-form-field |
|
|
<mat-form-field |
|
|
@ -444,11 +507,7 @@ |
|
|
class="w-100 without-hint" |
|
|
class="w-100 without-hint" |
|
|
> |
|
|
> |
|
|
<mat-label i18n>Locale</mat-label> |
|
|
<mat-label i18n>Locale</mat-label> |
|
|
<input |
|
|
<input formControlName="locale" matInput type="text" /> |
|
|
formControlName="locale" |
|
|
|
|
|
matInput |
|
|
|
|
|
type="text" |
|
|
|
|
|
/> |
|
|
|
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
@ -499,10 +558,10 @@ |
|
|
mat-flat-button |
|
|
mat-flat-button |
|
|
type="button" |
|
|
type="button" |
|
|
[disabled]=" |
|
|
[disabled]=" |
|
|
assetProfileForm.controls.scraperConfiguration |
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
.controls.selector.value === '' || |
|
|
.selector.value === '' || |
|
|
assetProfileForm.controls.scraperConfiguration |
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
.controls.url.value === '' |
|
|
.url.value === '' |
|
|
" |
|
|
" |
|
|
(click)="onTestMarketData()" |
|
|
(click)="onTestMarketData()" |
|
|
> |
|
|
> |
|
|
@ -510,84 +569,10 @@ |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</mat-expansion-panel> |
|
|
|
|
|
</mat-accordion> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
|
|
|
@if (assetProfile?.dataSource === 'MANUAL') { |
|
|
|
|
|
<div> |
|
|
|
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
|
|
|
<mat-label i18n>Sectors</mat-label> |
|
|
|
|
|
<textarea |
|
|
|
|
|
cdkTextareaAutosize |
|
|
|
|
|
formControlName="sectors" |
|
|
|
|
|
matInput |
|
|
|
|
|
type="text" |
|
|
|
|
|
></textarea> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div> |
|
|
|
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
|
|
|
<mat-label i18n>Countries</mat-label> |
|
|
|
|
|
<textarea |
|
|
|
|
|
cdkTextareaAutosize |
|
|
|
|
|
formControlName="countries" |
|
|
|
|
|
matInput |
|
|
|
|
|
type="text" |
|
|
|
|
|
></textarea> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
|
|
|
<div> |
|
|
|
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
|
|
|
<mat-label i18n>Url</mat-label> |
|
|
|
|
|
<input formControlName="url" matInput type="text" /> |
|
|
|
|
|
@if (assetProfileForm.get('url').value) { |
|
|
|
|
|
<gf-entity-logo |
|
|
|
|
|
class="mr-3" |
|
|
|
|
|
matSuffix |
|
|
|
|
|
[url]="assetProfileForm.get('url').value" |
|
|
|
|
|
/> |
|
|
|
|
|
} |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="mt-3"> |
|
|
|
|
|
<mat-form-field appearance="outline" class="w-100"> |
|
|
|
|
|
<mat-label i18n>Note</mat-label> |
|
|
|
|
|
<textarea |
|
|
|
|
|
cdkAutosizeMinRows="2" |
|
|
|
|
|
cdkTextareaAutosize |
|
|
|
|
|
formControlName="comment" |
|
|
|
|
|
matInput |
|
|
|
|
|
(keyup.enter)="$event.stopPropagation()" |
|
|
|
|
|
></textarea> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
</form> |
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
</mat-tab> |
|
|
</mat-tab> |
|
|
<mat-tab> |
|
|
} |
|
|
<ng-template mat-tab-label> |
|
|
|
|
|
<ion-icon name="server-outline" /> |
|
|
|
|
|
<div class="d-none d-sm-block ml-2" i18n>Historical Market Data</div> |
|
|
|
|
|
</ng-template> |
|
|
|
|
|
<div class="container mt-3 p-0"> |
|
|
|
|
|
<div class="no-gutters row w-100"> |
|
|
|
|
|
<div class="col-12"> |
|
|
|
|
|
<gf-historical-market-data-editor |
|
|
|
|
|
[currency]="assetProfile?.currency" |
|
|
|
|
|
[dataSource]="data.dataSource" |
|
|
|
|
|
[dateOfFirstActivity]="assetProfile?.dateOfFirstActivity" |
|
|
|
|
|
[locale]="data.locale" |
|
|
|
|
|
[marketData]="marketDataItems" |
|
|
|
|
|
[symbol]="data.symbol" |
|
|
|
|
|
[user]="user" |
|
|
|
|
|
(marketDataChanged)="onMarketDataChanged($event)" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</mat-tab> |
|
|
|
|
|
</mat-tab-group> |
|
|
</mat-tab-group> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|