From 27da0eb26e4081dcae2a05fd84e95661666f84be Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 11 Nov 2023 09:02:12 +0100 Subject: [PATCH] Feature/harmonize name column of historical market data table (#2632) * Harmonize name column * Update changelog --- CHANGELOG.md | 6 ++++++ .../admin-market-data.component.ts | 4 +++- .../admin-market-data/admin-market-data.html | 18 ++++++++++++++++++ .../admin-market-data.module.ts | 2 ++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c028dd480..8cbe1d4b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Harmonized the name column in the historical market data table of the admin control panel + ## 2.21.0 - 2023-11-09 ### Changed diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts index bcf7679d0..25076ca0a 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts @@ -20,6 +20,7 @@ import { Filter, UniqueAsset, User } from '@ghostfolio/common/interfaces'; import { AdminMarketDataItem } from '@ghostfolio/common/interfaces/admin-market-data.interface'; import { translate } from '@ghostfolio/ui/i18n'; import { AssetSubClass, DataSource, Prisma } from '@prisma/client'; +import { isUUID } from 'class-validator'; import { DeviceDetectorService } from 'ngx-device-detector'; import { Subject } from 'rxjs'; import { distinctUntilChanged, switchMap, takeUntil } from 'rxjs/operators'; @@ -83,7 +84,7 @@ export class AdminMarketDataComponent public defaultDateFormat: string; public deviceType: string; public displayedColumns = [ - 'symbol', + 'nameWithSymbol', 'dataSource', 'assetClass', 'assetSubClass', @@ -97,6 +98,7 @@ export class AdminMarketDataComponent ]; public filters$ = new Subject(); public isLoading = false; + public isUUID = isUUID; public placeholder = ''; public pageSize = DEFAULT_PAGE_SIZE; public totalItems = 0; diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.html b/apps/client/src/app/components/admin-market-data/admin-market-data.html index e7e8733e0..4fabde56d 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.html +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.html @@ -28,6 +28,24 @@ + + + Name + + +
{{ element.name }}
+
+ {{ element.symbol | gfSymbol }} +
+ + +
+ Data Source diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.module.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.module.ts index 060e8a6b0..bcac613a6 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.module.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.module.ts @@ -6,6 +6,7 @@ import { MatPaginatorModule } from '@angular/material/paginator'; import { MatSortModule } from '@angular/material/sort'; import { MatTableModule } from '@angular/material/table'; import { RouterModule } from '@angular/router'; +import { GfSymbolModule } from '@ghostfolio/client/pipes/symbol/symbol.module'; import { GfActivitiesFilterModule } from '@ghostfolio/ui/activities-filter/activities-filter.module'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; @@ -20,6 +21,7 @@ import { GfCreateAssetProfileDialogModule } from './create-asset-profile-dialog/ GfActivitiesFilterModule, GfAssetProfileDialogModule, GfCreateAssetProfileDialogModule, + GfSymbolModule, MatButtonModule, MatMenuModule, MatPaginatorModule,