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">
<gf-value
[isDate]="element.dateOfFirstActivity ? true : false"
[locale]="locale"
[locale]="locale()"
[value]="element.dateOfFirstActivity ?? ''"
/>
</div>
@ -76,7 +76,7 @@
<div class="d-flex justify-content-end">
<gf-value
[isCurrency]="true"
[locale]="locale"
[locale]="locale()"
[value]="isLoading() ? undefined : element.quantity"
/>
</div>
@ -100,7 +100,7 @@
<div class="d-flex justify-content-end">
<gf-value
[isCurrency]="true"
[locale]="locale"
[locale]="locale()"
[value]="isLoading() ? undefined : element.valueInBaseCurrency"
/>
</div>
@ -121,7 +121,7 @@
<div class="d-flex justify-content-end">
<gf-value
[isPercent]="true"
[locale]="locale"
[locale]="locale()"
[value]="isLoading() ? undefined : element.allocationInPercentage"
/>
</div>
@ -142,7 +142,7 @@
<gf-value
[colorizeSign]="true"
[isCurrency]="true"
[locale]="locale"
[locale]="locale()"
[value]="
isLoading() ? undefined : element.netPerformanceWithCurrencyEffect
"
@ -166,7 +166,7 @@
<gf-value
[colorizeSign]="true"
[isPercent]="true"
[locale]="locale"
[locale]="locale()"
[value]="
isLoading()
? undefined
@ -210,7 +210,7 @@
/>
}
@if (dataSource.data.length > pageSize && !isLoading) {
@if (dataSource.data.length > pageSize && !isLoading()) {
<div class="my-3 text-center">
<button mat-stroked-button (click)="onShowAllHoldings()">
<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 {
@Input() baseCurrency: string;
@Input() deviceType: string;
@Input() locale = getLocale();
@Input() pageSize = Number.MAX_SAFE_INTEGER;
@Output() holdingClicked = new EventEmitter<AssetProfileIdentifier>();
@ -60,6 +59,7 @@ export class GfHoldingsTableComponent {
public readonly hasPermissionToShowQuantities = input(true);
public readonly hasPermissionToShowValues = input(true);
public readonly holdings = input.required<PortfolioPosition[]>();
public readonly locale = input(getLocale());
public readonly paginator = viewChild.required(MatPaginator);
public readonly sort = viewChild.required(MatSort);

Loading…
Cancel
Save