|
|
@ -19,7 +19,7 @@ import { |
|
|
User |
|
|
User |
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
import { DateRange } from '@ghostfolio/common/types'; |
|
|
import { DateRange } from '@ghostfolio/common/types'; |
|
|
import { validateObjectForForm } from '@ghostfolio/common/utils'; |
|
|
import { jsonValidator, validateObjectForForm } from '@ghostfolio/common/utils'; |
|
|
import { GfCurrencySelectorComponent } from '@ghostfolio/ui/currency-selector'; |
|
|
import { GfCurrencySelectorComponent } from '@ghostfolio/ui/currency-selector'; |
|
|
import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; |
|
|
import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; |
|
|
import { GfHistoricalMarketDataEditorComponent } from '@ghostfolio/ui/historical-market-data-editor'; |
|
|
import { GfHistoricalMarketDataEditorComponent } from '@ghostfolio/ui/historical-market-data-editor'; |
|
|
@ -149,7 +149,7 @@ export class GfAssetProfileDialogComponent implements OnInit { |
|
|
assetClass: new FormControl<AssetClass>(undefined), |
|
|
assetClass: new FormControl<AssetClass>(undefined), |
|
|
assetSubClass: new FormControl<AssetSubClass>(undefined), |
|
|
assetSubClass: new FormControl<AssetSubClass>(undefined), |
|
|
comment: '', |
|
|
comment: '', |
|
|
countries: '', |
|
|
countries: ['', jsonValidator()], |
|
|
currency: '', |
|
|
currency: '', |
|
|
historicalData: this.formBuilder.group({ |
|
|
historicalData: this.formBuilder.group({ |
|
|
csvString: '' |
|
|
csvString: '' |
|
|
@ -158,14 +158,14 @@ export class GfAssetProfileDialogComponent implements OnInit { |
|
|
name: ['', Validators.required], |
|
|
name: ['', Validators.required], |
|
|
scraperConfiguration: this.formBuilder.group({ |
|
|
scraperConfiguration: this.formBuilder.group({ |
|
|
defaultMarketPrice: null, |
|
|
defaultMarketPrice: null, |
|
|
headers: JSON.stringify({}), |
|
|
headers: [JSON.stringify({}), jsonValidator()], |
|
|
locale: '', |
|
|
locale: '', |
|
|
mode: '', |
|
|
mode: '', |
|
|
selector: '', |
|
|
selector: '', |
|
|
url: '' |
|
|
url: '' |
|
|
}), |
|
|
}), |
|
|
sectors: '', |
|
|
sectors: ['', jsonValidator()], |
|
|
symbolMapping: '', |
|
|
symbolMapping: ['', jsonValidator()], |
|
|
url: '' |
|
|
url: '' |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|