Browse Source

feat(lib): change locale to signal input

pull/6307/head
Kenrick Tandrian 2 months ago
parent
commit
513e03398c
  1. 14
      libs/ui/src/lib/accounts-table/accounts-table.component.html
  2. 2
      libs/ui/src/lib/accounts-table/accounts-table.component.ts

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

@ -150,7 +150,7 @@
<gf-value <gf-value
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]="element.balance" [value]="element.balance"
/> />
</td> </td>
@ -162,7 +162,7 @@
<gf-value <gf-value
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]="totalBalanceInBaseCurrency" [value]="totalBalanceInBaseCurrency"
/> />
</td> </td>
@ -185,7 +185,7 @@
<gf-value <gf-value
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]="element.value" [value]="element.value"
/> />
</td> </td>
@ -197,7 +197,7 @@
<gf-value <gf-value
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]="totalValueInBaseCurrency" [value]="totalValueInBaseCurrency"
/> />
</td> </td>
@ -220,7 +220,7 @@
<gf-value <gf-value
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]="element.valueInBaseCurrency" [value]="element.valueInBaseCurrency"
/> />
</td> </td>
@ -232,7 +232,7 @@
<gf-value <gf-value
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isCurrency]="true" [isCurrency]="true"
[locale]="locale" [locale]="locale()"
[value]="totalValueInBaseCurrency" [value]="totalValueInBaseCurrency"
/> />
</td> </td>
@ -255,7 +255,7 @@
<gf-value <gf-value
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[isPercent]="true" [isPercent]="true"
[locale]="locale" [locale]="locale()"
[precision]="2" [precision]="2"
[value]="element.allocationInPercentage" [value]="element.allocationInPercentage"
/> />

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

@ -59,7 +59,6 @@ export class GfAccountsTableComponent {
@Input() baseCurrency: string; @Input() baseCurrency: string;
@Input() deviceType: string; @Input() deviceType: string;
@Input() hasPermissionToOpenDetails = true; @Input() hasPermissionToOpenDetails = true;
@Input() locale = getLocale();
@Input() showFooter = true; @Input() showFooter = true;
@Input() totalBalanceInBaseCurrency: number; @Input() totalBalanceInBaseCurrency: number;
@Input() totalValueInBaseCurrency: number; @Input() totalValueInBaseCurrency: number;
@ -69,6 +68,7 @@ export class GfAccountsTableComponent {
@Output() transferBalance = new EventEmitter<void>(); @Output() transferBalance = new EventEmitter<void>();
public readonly accounts = input.required<Account[] | undefined>(); public readonly accounts = input.required<Account[] | undefined>();
public readonly locale = input(getLocale());
public readonly showActions = input<boolean>(); public readonly showActions = input<boolean>();
public readonly showActivitiesCount = input(true); public readonly showActivitiesCount = input(true);
public readonly showAllocationInPercentage = input<boolean>(); public readonly showAllocationInPercentage = input<boolean>();

Loading…
Cancel
Save