From 0440868b7c3a11bc4bb5562234368bc9dd680222 Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Fri, 2 Oct 2026 00:09:10 +0700 Subject: [PATCH] fix: restore optional value input and revert call-site fallbacks --- .../asset-profile-dialog/asset-profile-dialog.html | 6 +++--- .../holding-detail-dialog/holding-detail-dialog.html | 2 +- .../portfolio-summary/portfolio-summary.component.html | 4 ++-- .../pages/portfolio/allocations/allocations-page.html | 10 ++++------ .../lib/accounts-table/accounts-table.component.html | 6 +++--- libs/ui/src/lib/value/value.component.ts | 2 +- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html index a1ef0ca434..6e1336de09 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html @@ -219,7 +219,7 @@ i18n size="medium" [isLoading]="isLoading" - [value]="assetProfile?.currency ?? null" + [value]="assetProfile?.currency" >Currency @@ -228,7 +228,7 @@ size="medium" [enableCopyToClipboardButton]="true" [hidden]="!assetProfile?.isin" - [value]="assetProfile?.isin ?? null" + [value]="assetProfile?.isin" >ISIN @@ -249,7 +249,7 @@ size="medium" [isLoading]="isLoading" [locale]="data.locale" - [value]="assetProfile?.activitiesCount ?? null" + [value]="assetProfile?.activitiesCount" >Activities 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 4242b5b37b..2b378a4d60 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 @@ -342,7 +342,7 @@ size="medium" [enableCopyToClipboardButton]="true" [hidden]="!assetProfile?.isin" - [value]="assetProfile?.isin ?? null" + [value]="assetProfile?.isin" >ISIN diff --git a/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html b/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html index 519fb04ab2..0a0beba910 100644 --- a/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html +++ b/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html @@ -5,7 +5,7 @@ @@ -413,7 +413,7 @@ [locale]="locale" [precision]="precision" [unit]="displayedCurrency" - [value]="summary?.totalValueInBaseCurrency ?? null" + [value]="summary?.totalValueInBaseCurrency" /> diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.html b/apps/client/src/app/pages/portfolio/allocations/allocations-page.html index 54138c0fb2..79f5e4ecbf 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.html +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.html @@ -16,9 +16,7 @@ size="medium" [isLoading]="isLoading" [isPercent]="true" - [value]=" - portfolioDetails?.summary?.filteredValueInPercentage ?? null - " + [value]="portfolioDetails?.summary?.filteredValueInPercentage" /> @@ -216,7 +214,7 @@ size="large" [isLoading]="isLoading" [isPercent]="true" - [value]="markets?.developedMarkets?.valueInPercentage ?? null" + [value]="markets?.developedMarkets?.valueInPercentage" >Developed Markets @@ -226,7 +224,7 @@ size="large" [isLoading]="isLoading" [isPercent]="true" - [value]="markets?.emergingMarkets?.valueInPercentage ?? null" + [value]="markets?.emergingMarkets?.valueInPercentage" >Emerging Markets @@ -236,7 +234,7 @@ size="large" [isLoading]="isLoading" [isPercent]="true" - [value]="markets?.otherMarkets?.valueInPercentage ?? null" + [value]="markets?.otherMarkets?.valueInPercentage" >Other Markets diff --git a/libs/ui/src/lib/accounts-table/accounts-table.component.html b/libs/ui/src/lib/accounts-table/accounts-table.component.html index 8298e74a33..60be93ad8a 100644 --- a/libs/ui/src/lib/accounts-table/accounts-table.component.html +++ b/libs/ui/src/lib/accounts-table/accounts-table.component.html @@ -183,7 +183,7 @@ class="d-inline-block justify-content-end" [isCurrency]="true" [locale]="locale()" - [value]="totalBalanceInBaseCurrency() ?? null" + [value]="totalBalanceInBaseCurrency()" /> @@ -218,7 +218,7 @@ class="d-inline-block justify-content-end" [isCurrency]="true" [locale]="locale()" - [value]="totalValueInBaseCurrency() ?? null" + [value]="totalValueInBaseCurrency()" /> @@ -253,7 +253,7 @@ class="d-inline-block justify-content-end" [isCurrency]="true" [locale]="locale()" - [value]="totalValueInBaseCurrency() ?? null" + [value]="totalValueInBaseCurrency()" /> diff --git a/libs/ui/src/lib/value/value.component.ts b/libs/ui/src/lib/value/value.component.ts index 34ce354f68..4101b4066f 100644 --- a/libs/ui/src/lib/value/value.component.ts +++ b/libs/ui/src/lib/value/value.component.ts @@ -47,7 +47,7 @@ export class GfValueComponent implements AfterViewInit, OnChanges, OnDestroy { @Input() size: 'large' | 'medium' | 'small' = 'small'; @Input() subLabel?: string = ''; @Input() unit?: string | null = ''; - @Input() value: number | string | null = ''; + @Input() value?: number | string | null = ''; @ViewChild('labelContent', { static: false }) labelContent!: ElementRef;