Browse Source

fix(lib): changed locale to input signal

pull/6306/head
Kenrick Tandrian 2 months ago
parent
commit
5422e0536d
  1. 14
      libs/ui/src/lib/holdings-table/holdings-table.component.html
  2. 2
      libs/ui/src/lib/holdings-table/holdings-table.component.ts

14
libs/ui/src/lib/holdings-table/holdings-table.component.html

@ -52,7 +52,7 @@
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<gf-value <gf-value
[isDate]="element.dateOfFirstActivity ? true : false" [isDate]="element.dateOfFirstActivity ? true : false"
[locale]="locale" [locale]="locale()"
[value]="element.dateOfFirstActivity ?? ''" [value]="element.dateOfFirstActivity ?? ''"
/> />
</div> </div>
@ -76,7 +76,7 @@
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<gf-value <gf-value
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]="isLoading() ? undefined : element.quantity" [value]="isLoading() ? undefined : element.quantity"
/> />
</div> </div>
@ -100,7 +100,7 @@
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<gf-value <gf-value
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]="isLoading() ? undefined : element.valueInBaseCurrency" [value]="isLoading() ? undefined : element.valueInBaseCurrency"
/> />
</div> </div>
@ -121,7 +121,7 @@
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<gf-value <gf-value
[isPercent]="true" [isPercent]="true"
[locale]="locale" [locale]="locale()"
[value]="isLoading() ? undefined : element.allocationInPercentage" [value]="isLoading() ? undefined : element.allocationInPercentage"
/> />
</div> </div>
@ -142,7 +142,7 @@
<gf-value <gf-value
[colorizeSign]="true" [colorizeSign]="true"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]=" [value]="
isLoading() ? undefined : element.netPerformanceWithCurrencyEffect isLoading() ? undefined : element.netPerformanceWithCurrencyEffect
" "
@ -166,7 +166,7 @@
<gf-value <gf-value
[colorizeSign]="true" [colorizeSign]="true"
[isPercent]="true" [isPercent]="true"
[locale]="locale" [locale]="locale()"
[value]=" [value]="
isLoading() isLoading()
? undefined ? undefined
@ -210,7 +210,7 @@
/> />
} }
@if (dataSource.data.length > pageSize && !isLoading) { @if (dataSource.data.length > pageSize && !isLoading()) {
<div class="my-3 text-center"> <div class="my-3 text-center">
<button mat-stroked-button (click)="onShowAllHoldings()"> <button mat-stroked-button (click)="onShowAllHoldings()">
<ng-container i18n>Show all</ng-container> <ng-container i18n>Show all</ng-container>

2
libs/ui/src/lib/holdings-table/holdings-table.component.ts

@ -49,7 +49,6 @@ import { GfValueComponent } from '../value/value.component';
export class GfHoldingsTableComponent { export class GfHoldingsTableComponent {
@Input() baseCurrency: string; @Input() baseCurrency: string;
@Input() deviceType: string; @Input() deviceType: string;
@Input() locale = getLocale();
@Input() pageSize = Number.MAX_SAFE_INTEGER; @Input() pageSize = Number.MAX_SAFE_INTEGER;
@Output() holdingClicked = new EventEmitter<AssetProfileIdentifier>(); @Output() holdingClicked = new EventEmitter<AssetProfileIdentifier>();
@ -60,6 +59,7 @@ export class GfHoldingsTableComponent {
public readonly hasPermissionToShowQuantities = input(true); public readonly hasPermissionToShowQuantities = input(true);
public readonly hasPermissionToShowValues = input(true); public readonly hasPermissionToShowValues = input(true);
public readonly holdings = input.required<PortfolioPosition[]>(); public readonly holdings = input.required<PortfolioPosition[]>();
public readonly locale = input(getLocale());
public readonly paginator = viewChild.required(MatPaginator); public readonly paginator = viewChild.required(MatPaginator);
public readonly sort = viewChild.required(MatSort); public readonly sort = viewChild.required(MatSort);

Loading…
Cancel
Save