diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html index 5a86e4aa9b..7f50255012 100644 --- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html +++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html @@ -153,7 +153,6 @@ [hasPermissionToCreateActivity]="data.hasPermissionToCreateActivity" [hasPermissionToDeleteActivity]="false" [hasPermissionToExportActivities]="!showValuesInPercentage()" - [hasPermissionToFilter]="false" [hasPermissionToOpenDetails]="false" [hasPermissionToUpdateActivity]="data.hasPermissionToUpdateActivity" [locale]="user?.settings?.locale" diff --git a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html index b54cc68f7d..494c61a021 100644 --- a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html +++ b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -383,7 +383,6 @@ [hasPermissionToExportActivities]=" !data.impersonationId && !user?.settings?.isRestrictedView " - [hasPermissionToFilter]="false" [hasPermissionToOpenDetails]="false" [hasPermissionToUpdateActivity]="data.hasPermissionToUpdateActivity" [locale]="data.locale" diff --git a/apps/client/src/app/components/markets/markets.component.ts b/apps/client/src/app/components/markets/markets.component.ts index 3d09905bb0..1c8fdb1e1d 100644 --- a/apps/client/src/app/components/markets/markets.component.ts +++ b/apps/client/src/app/components/markets/markets.component.ts @@ -28,6 +28,7 @@ import { signal } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { isNumber } from 'lodash-es'; import { DeviceDetectorService } from 'ngx-device-detector'; @Component({ @@ -158,18 +159,20 @@ export class GfMarketsComponent implements OnInit { this.fearAndGreedIndex = this.fearAndGreedIndexData[this.fearAndGreedIndexMode]?.marketPrice; - this.historicalDataItems = [ - ...( - this.fearAndGreedIndexData[this.fearAndGreedIndexMode] - ?.historicalData ?? [] - ).map(({ date, value }) => ({ - date, - value: value ?? 0 - })), - { + const historicalDataItems = ( + this.fearAndGreedIndexData[this.fearAndGreedIndexMode]?.historicalData ?? + [] + ).filter((item): item is LineChartItem => { + return isNumber(item.value); + }); + + if (isNumber(this.fearAndGreedIndex)) { + historicalDataItems.push({ date: resetHours(new Date()).toISOString(), - value: this.fearAndGreedIndex ?? 0 - } - ]; + value: this.fearAndGreedIndex + }); + } + + this.historicalDataItems = historicalDataItems; } } diff --git a/apps/client/tsconfig.json b/apps/client/tsconfig.json index e1b906fed0..b009454a0d 100644 --- a/apps/client/tsconfig.json +++ b/apps/client/tsconfig.json @@ -14,7 +14,15 @@ } ], "angularCompilerOptions": { + "extendedDiagnostics": { + "checks": { + // TODO: Remove once the fields are typed as optional + "nullishCoalescingNotNullable": "suppress", + "optionalChainNotNullable": "suppress" + } + }, "strictInjectionParameters": true, + "strictInputAccessModifiers": true, "strictTemplates": true }, "compilerOptions": {