Browse Source

Merge f4227b40de into 7b885a11e2

pull/6094/merge
Sven Günther 1 day ago
committed by GitHub
parent
commit
5c3b5b6664
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 16
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss
  3. 7
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
  4. 189
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html

1
CHANGELOG.md

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Lifted the asset profile identifier editing restriction for `MANUAL` data sources in the asset profile details dialog of the admin control panel - Lifted the asset profile identifier editing restriction for `MANUAL` data sources in the asset profile details dialog of the admin control panel
- Upgraded `shx` from version `0.3.4` to `0.4.0` - Upgraded `shx` from version `0.3.4` to `0.4.0`
- moved the scraper configuration to tab in asset profile dialog
### Fixed ### Fixed

16
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.scss

@ -13,21 +13,5 @@
right: 1rem; right: 1rem;
top: 0; top: 0;
} }
.mat-expansion-panel {
--mat-expansion-container-background-color: transparent;
::ng-deep {
.mat-expansion-panel-body {
padding: 0;
}
}
.mat-expansion-panel-header {
&:hover {
--mat-expansion-header-hover-state-layer-color: transparent;
}
}
}
} }
} }

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

@ -39,8 +39,7 @@ import {
Inject, Inject,
OnDestroy, OnDestroy,
OnInit, OnInit,
ViewChild, ViewChild
signal
} from '@angular/core'; } from '@angular/core';
import { import {
AbstractControl, AbstractControl,
@ -61,7 +60,6 @@ import {
MatDialogModule, MatDialogModule,
MatDialogRef MatDialogRef
} from '@angular/material/dialog'; } from '@angular/material/dialog';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { MatMenuModule } from '@angular/material/menu'; import { MatMenuModule } from '@angular/material/menu';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
@ -108,7 +106,6 @@ import { AssetProfileDialogParams } from './interfaces/interfaces';
MatButtonModule, MatButtonModule,
MatCheckboxModule, MatCheckboxModule,
MatDialogModule, MatDialogModule,
MatExpansionModule,
MatInputModule, MatInputModule,
MatMenuModule, MatMenuModule,
MatSelectModule, MatSelectModule,
@ -235,8 +232,6 @@ export class GfAssetProfileDialogComponent implements OnDestroy, OnInit {
} }
]; ];
public scraperConfiguationIsExpanded = signal(false);
public sectors: { public sectors: {
[name: string]: { name: string; value: number }; [name: string]: { name: string; value: number };
}; };

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

@ -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>

Loading…
Cancel
Save