Browse Source

Merge branch 'main' into bugfix/fix-horizontal-overflow-in-historical-market-data-table-of-admin-control-panel

pull/3515/head
Thomas Kaul 1 year ago
committed by GitHub
parent
commit
56f007edb5
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      CHANGELOG.md
  2. 2
      apps/api/src/app/admin/admin.module.ts
  3. 13
      apps/api/src/app/admin/admin.service.ts
  4. 1
      apps/api/src/app/info/info.module.ts
  5. 5
      apps/client/src/app/components/admin-market-data/admin-market-data.component.ts
  6. 22
      apps/client/src/styles.scss
  7. 1
      libs/common/src/lib/types/market-data-preset.type.ts

5
CHANGELOG.md

@ -7,8 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Added
- Added a benchmarks preset to the historical market data table of the admin control panel
### Fixed ### Fixed
- Fixed the dialog position (center) on mobile
- Fixed the horizontal overflow in the historical market data table of the admin control panel - Fixed the horizontal overflow in the historical market data table of the admin control panel
- Changed the mechanism of the `INTRADAY` data gathering to persist data only if the market state is `OPEN` - Changed the mechanism of the `INTRADAY` data gathering to persist data only if the market state is `OPEN`
- Fixed the creation of activities with `MANUAL` data source (with no historical market data) - Fixed the creation of activities with `MANUAL` data source (with no historical market data)

2
apps/api/src/app/admin/admin.module.ts

@ -1,3 +1,4 @@
import { BenchmarkModule } from '@ghostfolio/api/app/benchmark/benchmark.module';
import { OrderModule } from '@ghostfolio/api/app/order/order.module'; import { OrderModule } from '@ghostfolio/api/app/order/order.module';
import { SubscriptionModule } from '@ghostfolio/api/app/subscription/subscription.module'; import { SubscriptionModule } from '@ghostfolio/api/app/subscription/subscription.module';
import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module'; import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module';
@ -20,6 +21,7 @@ import { QueueModule } from './queue/queue.module';
@Module({ @Module({
imports: [ imports: [
ApiModule, ApiModule,
BenchmarkModule,
ConfigurationModule, ConfigurationModule,
DataGatheringModule, DataGatheringModule,
DataProviderModule, DataProviderModule,

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

@ -1,3 +1,4 @@
import { BenchmarkService } from '@ghostfolio/api/app/benchmark/benchmark.service';
import { OrderService } from '@ghostfolio/api/app/order/order.service'; import { OrderService } from '@ghostfolio/api/app/order/order.service';
import { SubscriptionService } from '@ghostfolio/api/app/subscription/subscription.service'; import { SubscriptionService } from '@ghostfolio/api/app/subscription/subscription.service';
import { environment } from '@ghostfolio/api/environments/environment'; import { environment } from '@ghostfolio/api/environments/environment';
@ -41,6 +42,7 @@ import { groupBy } from 'lodash';
@Injectable() @Injectable()
export class AdminService { export class AdminService {
public constructor( public constructor(
private readonly benchmarkService: BenchmarkService,
private readonly configurationService: ConfigurationService, private readonly configurationService: ConfigurationService,
private readonly dataProviderService: DataProviderService, private readonly dataProviderService: DataProviderService,
private readonly exchangeRateDataService: ExchangeRateDataService, private readonly exchangeRateDataService: ExchangeRateDataService,
@ -151,7 +153,16 @@ export class AdminService {
[{ symbol: 'asc' }]; [{ symbol: 'asc' }];
const where: Prisma.SymbolProfileWhereInput = {}; const where: Prisma.SymbolProfileWhereInput = {};
if (presetId === 'CURRENCIES') { if (presetId === 'BENCHMARKS') {
const benchmarkAssetProfiles =
await this.benchmarkService.getBenchmarkAssetProfiles();
where.id = {
in: benchmarkAssetProfiles.map(({ id }) => {
return id;
})
};
} else if (presetId === 'CURRENCIES') {
return this.getMarketDataForCurrencies(); return this.getMarketDataForCurrencies();
} else if ( } else if (
presetId === 'ETF_WITHOUT_COUNTRIES' || presetId === 'ETF_WITHOUT_COUNTRIES' ||

1
apps/api/src/app/info/info.module.ts

@ -7,7 +7,6 @@ import { ConfigurationModule } from '@ghostfolio/api/services/configuration/conf
import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering/data-gathering.module'; import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering/data-gathering.module';
import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module';
import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module';
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module';
import { PropertyModule } from '@ghostfolio/api/services/property/property.module'; import { PropertyModule } from '@ghostfolio/api/services/property/property.module';
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module';
import { TagModule } from '@ghostfolio/api/services/tag/tag.module'; import { TagModule } from '@ghostfolio/api/services/tag/tag.module';

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

@ -68,6 +68,11 @@ export class AdminMarketDataComponent
}; };
}) })
.concat([ .concat([
{
id: 'BENCHMARKS',
label: $localize`Benchmarks`,
type: <Filter['type']>'PRESET_ID'
},
{ {
id: 'CURRENCIES', id: 'CURRENCIES',
label: $localize`Currencies`, label: $localize`Currencies`,

22
apps/client/src/styles.scss

@ -214,16 +214,6 @@ body {
} }
} }
.mat-mdc-menu-panel {
&.assistant {
max-width: unset !important;
.mat-mdc-menu-content {
padding: 0;
}
}
}
&.is-dark-theme { &.is-dark-theme {
background: var(--dark-background); background: var(--dark-background);
color: rgba(var(--light-primary-text)); color: rgba(var(--light-primary-text));
@ -366,6 +356,10 @@ ngx-skeleton-loader {
} }
.cdk-overlay-container { .cdk-overlay-container {
.cdk-global-overlay-wrapper {
justify-content: center !important;
}
.cdk-overlay-pane { .cdk-overlay-pane {
max-width: 95vw !important; max-width: 95vw !important;
} }
@ -453,6 +447,14 @@ ngx-skeleton-loader {
} }
.mat-mdc-menu-panel { .mat-mdc-menu-panel {
&.assistant {
max-width: unset !important;
.mat-mdc-menu-content {
padding: 0;
}
}
.mat-mdc-menu-item { .mat-mdc-menu-item {
&.font-weight-bold { &.font-weight-bold {
.mat-mdc-menu-item-text { .mat-mdc-menu-item-text {

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

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

Loading…
Cancel
Save