Browse Source

Feature/add new market data preset (#6346)

* Add new market data preset (no activities)

* Update changelog
pull/6351/head
David Requeno 2 weeks ago
committed by GitHub
parent
commit
117a938bad
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 4
      apps/api/src/app/admin/admin.service.ts
  3. 5
      apps/client/src/app/components/admin-market-data/admin-market-data.component.ts
  4. 3
      libs/common/src/lib/types/market-data-preset.type.ts

1
CHANGELOG.md

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Added a _No Activities_ preset to the historical market data table of the admin control panel
- Added support for custom cryptocurrencies defined in the database - Added support for custom cryptocurrencies defined in the database
- Added support for the cryptocurrency _Sky_ - Added support for the cryptocurrency _Sky_

4
apps/api/src/app/admin/admin.service.ts

@ -225,6 +225,10 @@ export class AdminService {
presetId === 'ETF_WITHOUT_SECTORS' presetId === 'ETF_WITHOUT_SECTORS'
) { ) {
filters = [{ id: 'ETF', type: 'ASSET_SUB_CLASS' }]; filters = [{ id: 'ETF', type: 'ASSET_SUB_CLASS' }];
} else if (presetId === 'NO_ACTIVITIES') {
where.activities = {
none: {}
};
} }
const searchQuery = filters.find(({ type }) => { const searchQuery = filters.find(({ type }) => {

5
apps/client/src/app/components/admin-market-data/admin-market-data.component.ts

@ -140,6 +140,11 @@ export class GfAdminMarketDataComponent
id: 'ETF_WITHOUT_SECTORS', id: 'ETF_WITHOUT_SECTORS',
label: $localize`ETFs without Sectors`, label: $localize`ETFs without Sectors`,
type: 'PRESET_ID' as Filter['type'] type: 'PRESET_ID' as Filter['type']
},
{
id: 'NO_ACTIVITIES',
label: $localize`No Activities`,
type: 'PRESET_ID' as Filter['type']
} }
]; ];
public benchmarks: Partial<SymbolProfile>[]; public benchmarks: Partial<SymbolProfile>[];

3
libs/common/src/lib/types/market-data-preset.type.ts

@ -2,4 +2,5 @@ export type MarketDataPreset =
| 'BENCHMARKS' | 'BENCHMARKS'
| 'CURRENCIES' | 'CURRENCIES'
| 'ETF_WITHOUT_COUNTRIES' | 'ETF_WITHOUT_COUNTRIES'
| 'ETF_WITHOUT_SECTORS'; | 'ETF_WITHOUT_SECTORS'
| 'NO_ACTIVITIES';

Loading…
Cancel
Save