From 27c50bf5096c5d561af4e35d97d6f55ad1e81ad9 Mon Sep 17 00:00:00 2001 From: Kenrick Tandrian <60643640+KenTandrian@users.noreply.github.com> Date: Sat, 14 Mar 2026 17:06:46 +0700 Subject: [PATCH] Task/improve type safety of benchmark component (#6555) * Improve type safety --- .../interfaces/interfaces.ts | 2 +- .../lib/benchmark/benchmark.component.html | 16 +- .../src/lib/benchmark/benchmark.component.ts | 147 +++++++++--------- 3 files changed, 79 insertions(+), 86 deletions(-) diff --git a/libs/ui/src/lib/benchmark/benchmark-detail-dialog/interfaces/interfaces.ts b/libs/ui/src/lib/benchmark/benchmark-detail-dialog/interfaces/interfaces.ts index 291f4c973..b01403284 100644 --- a/libs/ui/src/lib/benchmark/benchmark-detail-dialog/interfaces/interfaces.ts +++ b/libs/ui/src/lib/benchmark/benchmark-detail-dialog/interfaces/interfaces.ts @@ -3,7 +3,7 @@ import { ColorScheme } from '@ghostfolio/common/types'; import { DataSource } from '@prisma/client'; export interface BenchmarkDetailDialogParams { - colorScheme: ColorScheme; + colorScheme?: ColorScheme; dataSource: DataSource; deviceType: string; locale: string; diff --git a/libs/ui/src/lib/benchmark/benchmark.component.html b/libs/ui/src/lib/benchmark/benchmark.component.html index ab6db8887..8820f2ec1 100644 --- a/libs/ui/src/lib/benchmark/benchmark.component.html +++ b/libs/ui/src/lib/benchmark/benchmark.component.html @@ -15,7 +15,7 @@
{{ element?.name }}
- @if (showSymbol) { + @if (showSymbol()) {
{{ element?.symbol }}
@@ -98,7 +98,7 @@ @if (element?.performances?.allTimeHigh?.date) { } @@ -123,7 +123,7 @@ - @if (hasPermissionToDeleteItem) { + @if (hasPermissionToDeleteItem()) {