Browse Source

Feature/add new market data preset

pull/6346/head
David Requeno 1 month ago
parent
commit
c8b1a3a8ec
  1. 4
      apps/api/src/app/admin/admin.service.ts
  2. 5
      apps/client/src/app/components/admin-market-data/admin-market-data.component.ts
  3. 3
      libs/common/src/lib/types/market-data-preset.type.ts

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

@ -442,6 +442,10 @@ export class AdminService {
marketData = marketData.filter(({ sectorsCount }) => { marketData = marketData.filter(({ sectorsCount }) => {
return sectorsCount === 0; return sectorsCount === 0;
}); });
} else if (presetId === 'WITHOUT_ACTIVITIES') {
marketData = marketData.filter(({ activitiesCount }) => {
return activitiesCount === 0;
});
} }
count = marketData.length; count = marketData.length;

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: 'WITHOUT_ACTIVITIES',
label: $localize`Without 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'
| 'WITHOUT_ACTIVITIES';

Loading…
Cancel
Save