Browse Source

Initial setup for feature

pull/2854/head
Hugo Persson 2 years ago
committed by Thomas Kaul
parent
commit
8760b8ea1f
  1. 12
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
  2. 26
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html

12
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts

@ -58,7 +58,9 @@ export class AssetProfileDialog implements OnDestroy, OnInit {
}),
name: ['', Validators.required],
scraperConfiguration: '',
symbolMapping: ''
symbolMapping: '',
countries: '',
sectors: ''
});
public assetProfileSubClass: string;
public benchmarks: Partial<SymbolProfile>[];
@ -149,8 +151,11 @@ export class AssetProfileDialog implements OnDestroy, OnInit {
scraperConfiguration: JSON.stringify(
this.assetProfile?.scraperConfiguration ?? {}
),
symbolMapping: JSON.stringify(this.assetProfile?.symbolMapping ?? {})
symbolMapping: JSON.stringify(this.assetProfile?.symbolMapping ?? {}),
countries: JSON.stringify(this.countries ?? {}),
sectors: JSON.stringify(this.sectors ?? {})
});
console.log(this.assetProfileForm.value);
this.assetProfileForm.markAsPristine();
@ -186,7 +191,8 @@ export class AssetProfileDialog implements OnDestroy, OnInit {
header: true,
skipEmptyLines: true
}
).data;
).data;
this.adminService
.postMarketData({

26
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html

@ -263,6 +263,32 @@
</div>
</mat-form-field>
</div>
<div *ngIf="assetProfile?.dataSource === 'MANUAL'">
<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 *ngIf="assetProfile?.dataSource === 'MANUAL'">
<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">
<mat-label i18n>Note</mat-label>

Loading…
Cancel
Save