Browse Source

fix: restore optional value input and revert call-site fallbacks

pull/7964/head
KenTandrian 2 weeks ago
parent
commit
0440868b7c
  1. 6
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
  2. 2
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
  3. 4
      apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
  4. 10
      apps/client/src/app/pages/portfolio/allocations/allocations-page.html
  5. 6
      libs/ui/src/lib/accounts-table/accounts-table.component.html
  6. 2
      libs/ui/src/lib/value/value.component.ts

6
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html

@ -219,7 +219,7 @@
i18n i18n
size="medium" size="medium"
[isLoading]="isLoading" [isLoading]="isLoading"
[value]="assetProfile?.currency ?? null" [value]="assetProfile?.currency"
>Currency</gf-value >Currency</gf-value
> >
</div> </div>
@ -228,7 +228,7 @@
size="medium" size="medium"
[enableCopyToClipboardButton]="true" [enableCopyToClipboardButton]="true"
[hidden]="!assetProfile?.isin" [hidden]="!assetProfile?.isin"
[value]="assetProfile?.isin ?? null" [value]="assetProfile?.isin"
>ISIN</gf-value >ISIN</gf-value
> >
</div> </div>
@ -249,7 +249,7 @@
size="medium" size="medium"
[isLoading]="isLoading" [isLoading]="isLoading"
[locale]="data.locale" [locale]="data.locale"
[value]="assetProfile?.activitiesCount ?? null" [value]="assetProfile?.activitiesCount"
>Activities</gf-value >Activities</gf-value
> >
</div> </div>

2
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html

@ -342,7 +342,7 @@
size="medium" size="medium"
[enableCopyToClipboardButton]="true" [enableCopyToClipboardButton]="true"
[hidden]="!assetProfile?.isin" [hidden]="!assetProfile?.isin"
[value]="assetProfile?.isin ?? null" [value]="assetProfile?.isin"
>ISIN</gf-value >ISIN</gf-value
> >
</div> </div>

4
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html

@ -5,7 +5,7 @@
<gf-value <gf-value
class="justify-content-end" class="justify-content-end"
[isLoading]="isLoading" [isLoading]="isLoading"
[value]="timeInMarket ?? null" [value]="timeInMarket"
/> />
</div> </div>
</div> </div>
@ -413,7 +413,7 @@
[locale]="locale" [locale]="locale"
[precision]="precision" [precision]="precision"
[unit]="displayedCurrency" [unit]="displayedCurrency"
[value]="summary?.totalValueInBaseCurrency ?? null" [value]="summary?.totalValueInBaseCurrency"
/> />
</div> </div>
</div> </div>

10
apps/client/src/app/pages/portfolio/allocations/allocations-page.html

@ -16,9 +16,7 @@
size="medium" size="medium"
[isLoading]="isLoading" [isLoading]="isLoading"
[isPercent]="true" [isPercent]="true"
[value]=" [value]="portfolioDetails?.summary?.filteredValueInPercentage"
portfolioDetails?.summary?.filteredValueInPercentage ?? null
"
/> />
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
@ -216,7 +214,7 @@
size="large" size="large"
[isLoading]="isLoading" [isLoading]="isLoading"
[isPercent]="true" [isPercent]="true"
[value]="markets?.developedMarkets?.valueInPercentage ?? null" [value]="markets?.developedMarkets?.valueInPercentage"
>Developed Markets</gf-value >Developed Markets</gf-value
> >
</div> </div>
@ -226,7 +224,7 @@
size="large" size="large"
[isLoading]="isLoading" [isLoading]="isLoading"
[isPercent]="true" [isPercent]="true"
[value]="markets?.emergingMarkets?.valueInPercentage ?? null" [value]="markets?.emergingMarkets?.valueInPercentage"
>Emerging Markets</gf-value >Emerging Markets</gf-value
> >
</div> </div>
@ -236,7 +234,7 @@
size="large" size="large"
[isLoading]="isLoading" [isLoading]="isLoading"
[isPercent]="true" [isPercent]="true"
[value]="markets?.otherMarkets?.valueInPercentage ?? null" [value]="markets?.otherMarkets?.valueInPercentage"
>Other Markets</gf-value >Other Markets</gf-value
> >
</div> </div>

6
libs/ui/src/lib/accounts-table/accounts-table.component.html

@ -183,7 +183,7 @@
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale()" [locale]="locale()"
[value]="totalBalanceInBaseCurrency() ?? null" [value]="totalBalanceInBaseCurrency()"
/> />
</td> </td>
</ng-container> </ng-container>
@ -218,7 +218,7 @@
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale()" [locale]="locale()"
[value]="totalValueInBaseCurrency() ?? null" [value]="totalValueInBaseCurrency()"
/> />
</td> </td>
</ng-container> </ng-container>
@ -253,7 +253,7 @@
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale()" [locale]="locale()"
[value]="totalValueInBaseCurrency() ?? null" [value]="totalValueInBaseCurrency()"
/> />
</td> </td>
</ng-container> </ng-container>

2
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() size: 'large' | 'medium' | 'small' = 'small';
@Input() subLabel?: string = ''; @Input() subLabel?: string = '';
@Input() unit?: string | null = ''; @Input() unit?: string | null = '';
@Input() value: number | string | null = ''; @Input() value?: number | string | null = '';
@ViewChild('labelContent', { static: false }) @ViewChild('labelContent', { static: false })
labelContent!: ElementRef<HTMLSpanElement>; labelContent!: ElementRef<HTMLSpanElement>;

Loading…
Cancel
Save