|
@ -2,14 +2,18 @@ |
|
|
<table |
|
|
<table |
|
|
class="gf-table holdings-table w-100" |
|
|
class="gf-table holdings-table w-100" |
|
|
mat-table |
|
|
mat-table |
|
|
matSort |
|
|
|
|
|
matSortActive="allocationInPercentage" |
|
|
|
|
|
matSortDirection="desc" |
|
|
|
|
|
multiTemplateDataRows |
|
|
multiTemplateDataRows |
|
|
|
|
|
style="table-layout: auto" |
|
|
[dataSource]="dataSource" |
|
|
[dataSource]="dataSource" |
|
|
> |
|
|
> |
|
|
|
|
|
<colgroup> |
|
|
|
|
|
<col class="w-100" /> |
|
|
|
|
|
<col /> |
|
|
|
|
|
<col /> |
|
|
|
|
|
</colgroup> |
|
|
|
|
|
|
|
|
<ng-container matColumnDef="name"> |
|
|
<ng-container matColumnDef="name"> |
|
|
<th *matHeaderCellDef class="px-2" mat-header-cell mat-sort-header> |
|
|
<th *matHeaderCellDef class="px-2" mat-header-cell> |
|
|
<ng-container i18n>Name</ng-container> |
|
|
<ng-container i18n>Name</ng-container> |
|
|
</th> |
|
|
</th> |
|
|
<td *matCellDef="let element" class="px-2" mat-cell> |
|
|
<td *matCellDef="let element" class="px-2" mat-cell> |
|
@ -18,12 +22,7 @@ |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
|
|
|
|
|
|
<ng-container matColumnDef="valueInBaseCurrency"> |
|
|
<ng-container matColumnDef="valueInBaseCurrency"> |
|
|
<th |
|
|
<th *matHeaderCellDef class="px-2 text-right" mat-header-cell> |
|
|
*matHeaderCellDef |
|
|
|
|
|
class="justify-content-end px-2" |
|
|
|
|
|
mat-header-cell |
|
|
|
|
|
mat-sort-header |
|
|
|
|
|
> |
|
|
|
|
|
<ng-container i18n>Value</ng-container> |
|
|
<ng-container i18n>Value</ng-container> |
|
|
</th> |
|
|
</th> |
|
|
<td *matCellDef="let element" class="px-2" mat-cell> |
|
|
<td *matCellDef="let element" class="px-2" mat-cell> |
|
@ -38,12 +37,7 @@ |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
|
|
|
|
|
|
<ng-container matColumnDef="allocationInPercentage" stickyEnd> |
|
|
<ng-container matColumnDef="allocationInPercentage" stickyEnd> |
|
|
<th |
|
|
<th *matHeaderCellDef class="justify-content-end px-2" mat-header-cell> |
|
|
*matHeaderCellDef |
|
|
|
|
|
class="justify-content-end px-2" |
|
|
|
|
|
mat-header-cell |
|
|
|
|
|
mat-sort-header |
|
|
|
|
|
> |
|
|
|
|
|
<span class="d-none d-sm-block" i18n>Allocation</span> |
|
|
<span class="d-none d-sm-block" i18n>Allocation</span> |
|
|
<span class="d-block d-sm-none" title="Allocation">%</span> |
|
|
<span class="d-block d-sm-none" title="Allocation">%</span> |
|
|
</th> |
|
|
</th> |
|
@ -61,6 +55,7 @@ |
|
|
<ng-container matColumnDef="expandedDetail"> |
|
|
<ng-container matColumnDef="expandedDetail"> |
|
|
<td |
|
|
<td |
|
|
*matCellDef="let element" |
|
|
*matCellDef="let element" |
|
|
|
|
|
class="p-0" |
|
|
mat-cell |
|
|
mat-cell |
|
|
[attr.colspan]="displayedColumns.length" |
|
|
[attr.colspan]="displayedColumns.length" |
|
|
> |
|
|
> |
|
@ -68,71 +63,61 @@ |
|
|
[@detailExpand]="element.expand ? 'expanded' : 'collapsed'" |
|
|
[@detailExpand]="element.expand ? 'expanded' : 'collapsed'" |
|
|
class="allocationByParent" |
|
|
class="allocationByParent" |
|
|
> |
|
|
> |
|
|
<div class="holdingParents"> |
|
|
<div class="holding-parents-table"> |
|
|
<div class="holdingParentProportionChart d-flex"> |
|
|
|
|
|
@for ( |
|
|
|
|
|
parentHolding of element.parents?.slice(0, 10); |
|
|
|
|
|
track parentHolding; |
|
|
|
|
|
let i = $index |
|
|
|
|
|
) { |
|
|
|
|
|
<div |
|
|
|
|
|
[class.cursor-pointer]="parentHolding?.symbol.length > 0" |
|
|
|
|
|
[matTooltip]="parentHolding.name" |
|
|
|
|
|
[style.background-color]="getColor(parentHolding?.symbol)" |
|
|
|
|
|
[style.width.%]="100 * parentHolding?.allocationInPercentage" |
|
|
|
|
|
(click)="onClickOpenPositionModal(parentHolding.position)" |
|
|
|
|
|
> |
|
|
|
|
|
{{ parentHolding?.symbol }} |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<table mat-table [dataSource]="element.parents"> |
|
|
<table mat-table [dataSource]="element.parents"> |
|
|
|
|
|
<colgroup> |
|
|
|
|
|
<col class="w-100" /> |
|
|
|
|
|
<col /> |
|
|
|
|
|
<col /> |
|
|
|
|
|
</colgroup> |
|
|
|
|
|
|
|
|
<ng-container matColumnDef="name"> |
|
|
<ng-container matColumnDef="name"> |
|
|
<th *matHeaderCellDef mat-header-cell>Name</th> |
|
|
|
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
<span |
|
|
|
|
|
class="colorBadge" |
|
|
|
|
|
[style.background-color]="getColor(parentHolding?.symbol)" |
|
|
|
|
|
></span> |
|
|
|
|
|
{{ parentHolding?.name }} |
|
|
{{ parentHolding?.name }} |
|
|
</td> |
|
|
</td> |
|
|
</ng-container> |
|
|
<td *matFooterCellDef class="px-2" mat-footer-cell> |
|
|
<ng-container matColumnDef="symbol"> |
|
|
<ng-container i18n>Name</ng-container> |
|
|
<th *matHeaderCellDef mat-header-cell>Symbol</th> |
|
|
|
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
|
|
|
{{ parentHolding?.symbol }} |
|
|
|
|
|
</td> |
|
|
</td> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
<ng-container matColumnDef="valueInBaseCurrency"> |
|
|
<ng-container matColumnDef="valueInBaseCurrency"> |
|
|
<th *matHeaderCellDef mat-header-cell>Value</th> |
|
|
|
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
|
|
|
<div class="d-flex justify-content-end"> |
|
|
<gf-value |
|
|
<gf-value |
|
|
[isCurrency]="true" |
|
|
[isCurrency]="true" |
|
|
[locale]="locale" |
|
|
[locale]="locale" |
|
|
[value]="parentHolding?.valueInBaseCurrency" |
|
|
[value]="parentHolding?.valueInBaseCurrency" |
|
|
/> |
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</td> |
|
|
|
|
|
<td *matFooterCellDef class="px-2" mat-footer-cell> |
|
|
|
|
|
<ng-container i18n>Value</ng-container> |
|
|
</td> |
|
|
</td> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
<ng-container matColumnDef="allocationInPercentage"> |
|
|
<ng-container matColumnDef="allocationInPercentage"> |
|
|
<th *matHeaderCellDef mat-header-cell>Allocation</th> |
|
|
|
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
|
|
|
<div class="d-flex justify-content-end"> |
|
|
<gf-value |
|
|
<gf-value |
|
|
[isPercent]="true" |
|
|
[isPercent]="true" |
|
|
[locale]="locale" |
|
|
[locale]="locale" |
|
|
[value]="parentHolding?.allocationInPercentage" |
|
|
[value]="parentHolding?.allocationInPercentage" |
|
|
/> |
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</td> |
|
|
|
|
|
<td *matFooterCellDef class="px-2" mat-footer-cell> |
|
|
|
|
|
<span class="d-none d-sm-block" i18n>Allocation</span> |
|
|
|
|
|
<span class="d-block d-sm-none">%</span> |
|
|
</td> |
|
|
</td> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
<tr |
|
|
<tr |
|
|
*matHeaderRowDef="displayedHoldingParentColumns" |
|
|
*matRowDef="let row; columns: displayedColumns" |
|
|
mat-header-row |
|
|
mat-row |
|
|
|
|
|
[ngClass]="{ 'cursor-pointer': row.position }" |
|
|
|
|
|
(click)="onClickHolding(row.position)" |
|
|
></tr> |
|
|
></tr> |
|
|
<tr |
|
|
<tr |
|
|
*matRowDef="let row; columns: displayedHoldingParentColumns" |
|
|
*matFooterRowDef="displayedColumns" |
|
|
mat-row |
|
|
mat-footer-row |
|
|
[class.cursor-pointer]="row.position" |
|
|
style="visibility: hidden" |
|
|
(click)="onClickOpenPositionModal(row.position)" |
|
|
|
|
|
></tr> |
|
|
></tr> |
|
|
</table> |
|
|
</table> |
|
|
</div> |
|
|
</div> |
|
@ -144,8 +129,10 @@ |
|
|
<tr |
|
|
<tr |
|
|
*matRowDef="let element; columns: displayedColumns" |
|
|
*matRowDef="let element; columns: displayedColumns" |
|
|
mat-row |
|
|
mat-row |
|
|
[class.cursor-pointer]="element.parents?.length > 0" |
|
|
[ngClass]="{ |
|
|
[class.expanded]="element.expand ?? false" |
|
|
'cursor-pointer': element.parents?.length > 0, |
|
|
|
|
|
expanded: element.expand ?? false |
|
|
|
|
|
}" |
|
|
(click)=" |
|
|
(click)=" |
|
|
element.expand ? (element.expand = false) : (element.expand = true) |
|
|
element.expand ? (element.expand = false) : (element.expand = true) |
|
|
" |
|
|
" |
|
|