Browse Source

Support migrating asset profile to MANUAL data source

pull/7376/head
Thomas Kaul 1 month ago
parent
commit
8b00798ac4
  1. 4
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
  2. 2
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html

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

@ -528,7 +528,7 @@ export class GfAssetProfileDialogComponent implements OnInit {
}); });
}, },
confirmType: ConfirmationDialogType.Primary, confirmType: ConfirmationDialogType.Primary,
title: $localize`Do you really want to convert this asset profile to ${DataSource.MANUAL}?` title: $localize`Do you really want to convert this asset profile to ${DataSource.MANUAL} data source?`
}); });
} }
@ -768,6 +768,8 @@ export class GfAssetProfileDialogComponent implements OnInit {
.pipe( .pipe(
catchError((error: HttpErrorResponse) => { catchError((error: HttpErrorResponse) => {
if (error.status === StatusCodes.CONFLICT) { if (error.status === StatusCodes.CONFLICT) {
// TODO: Ask if the user wants to merge the two asset profiles
this.snackBar.open( this.snackBar.open(
$localize`${assetProfileIdentifier.symbol} (${assetProfileIdentifier.dataSource}) is already in use.`, $localize`${assetProfileIdentifier.symbol} (${assetProfileIdentifier.dataSource}) is already in use.`,
undefined, undefined,

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

@ -163,7 +163,7 @@
</button> </button>
</form> </form>
@if (data.dataSource !== 'MANUAL') { @if (data.dataSource !== 'MANUAL') {
<p class="my-1" i18n>or</p> <p class="my-1 px-1 text-muted" i18n>or</p>
<button <button
color="accent" color="accent"
mat-flat-button mat-flat-button

Loading…
Cancel
Save