|
|
@ -1,14 +1,18 @@ |
|
|
|
<div class="overflow-x-auto"> |
|
|
|
<table |
|
|
|
class="gf-table w-100" |
|
|
|
class="gf-table holdings-table w-100" |
|
|
|
mat-table |
|
|
|
matSort |
|
|
|
matSortActive="allocationInPercentage" |
|
|
|
matSortDirection="desc" |
|
|
|
multiTemplateDataRows |
|
|
|
[dataSource]="dataSource" |
|
|
|
> |
|
|
|
<colgroup> |
|
|
|
<col class="w-100" /> |
|
|
|
<col /> |
|
|
|
<col /> |
|
|
|
</colgroup> |
|
|
|
|
|
|
|
<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> |
|
|
|
</th> |
|
|
|
<td *matCellDef="let element" class="px-2" mat-cell> |
|
|
@ -17,12 +21,7 @@ |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container matColumnDef="valueInBaseCurrency"> |
|
|
|
<th |
|
|
|
*matHeaderCellDef |
|
|
|
class="justify-content-end px-2" |
|
|
|
mat-header-cell |
|
|
|
mat-sort-header |
|
|
|
> |
|
|
|
<th *matHeaderCellDef class="px-2 text-right" mat-header-cell> |
|
|
|
<ng-container i18n>Value</ng-container> |
|
|
|
</th> |
|
|
|
<td *matCellDef="let element" class="px-2" mat-cell> |
|
|
@ -37,12 +36,7 @@ |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container matColumnDef="allocationInPercentage" stickyEnd> |
|
|
|
<th |
|
|
|
*matHeaderCellDef |
|
|
|
class="justify-content-end px-2" |
|
|
|
mat-header-cell |
|
|
|
mat-sort-header |
|
|
|
> |
|
|
|
<th *matHeaderCellDef class="justify-content-end px-2" mat-header-cell> |
|
|
|
<span class="d-none d-sm-block" i18n>Allocation</span> |
|
|
|
<span class="d-block d-sm-none" title="Allocation">%</span> |
|
|
|
</th> |
|
|
@ -57,8 +51,107 @@ |
|
|
|
</td> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container matColumnDef="expandedDetail"> |
|
|
|
<td |
|
|
|
*matCellDef="let element" |
|
|
|
class="p-0" |
|
|
|
mat-cell |
|
|
|
[attr.colspan]="displayedColumns.length" |
|
|
|
> |
|
|
|
<div [@detailExpand]="element.expand ? 'expanded' : 'collapsed'"> |
|
|
|
<div class="holding-parents-table"> |
|
|
|
<table |
|
|
|
class="gf-table w-100" |
|
|
|
mat-table |
|
|
|
[dataSource]="element.parents" |
|
|
|
> |
|
|
|
<colgroup> |
|
|
|
<col class="w-100" /> |
|
|
|
<col /> |
|
|
|
<col /> |
|
|
|
</colgroup> |
|
|
|
|
|
|
|
<ng-container matColumnDef="name"> |
|
|
|
<td *matCellDef="let parentHolding" class="px-2" mat-cell> |
|
|
|
<div |
|
|
|
class="align-items-center d-flex line-height-1 text-nowrap" |
|
|
|
> |
|
|
|
<div>{{ parentHolding?.name }}</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<small class="text-muted">{{ |
|
|
|
parentHolding?.symbol | gfSymbol |
|
|
|
}}</small> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td *matFooterCellDef class="px-2" mat-footer-cell> |
|
|
|
<ng-container i18n>Name</ng-container> |
|
|
|
</td> |
|
|
|
</ng-container> |
|
|
|
<ng-container matColumnDef="valueInBaseCurrency"> |
|
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
|
<div class="d-flex justify-content-end"> |
|
|
|
<gf-value |
|
|
|
[isCurrency]="true" |
|
|
|
[locale]="locale" |
|
|
|
[value]="parentHolding?.valueInBaseCurrency" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td *matFooterCellDef class="px-2" mat-footer-cell> |
|
|
|
<ng-container i18n>Value</ng-container> |
|
|
|
</td> |
|
|
|
</ng-container> |
|
|
|
<ng-container matColumnDef="allocationInPercentage" stickyEnd> |
|
|
|
<td *matCellDef="let parentHolding" mat-cell> |
|
|
|
<div class="d-flex justify-content-end"> |
|
|
|
<gf-value |
|
|
|
[isPercent]="true" |
|
|
|
[locale]="locale" |
|
|
|
[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> |
|
|
|
</ng-container> |
|
|
|
<tr |
|
|
|
*matRowDef="let row; columns: displayedColumns" |
|
|
|
mat-row |
|
|
|
[ngClass]="{ 'cursor-pointer': row.position }" |
|
|
|
(click)="onClickHolding(row.position)" |
|
|
|
></tr> |
|
|
|
<tr |
|
|
|
*matFooterRowDef="displayedColumns" |
|
|
|
class="hidden" |
|
|
|
mat-footer-row |
|
|
|
></tr> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<tr *matHeaderRowDef="displayedColumns" mat-header-row></tr> |
|
|
|
<tr *matRowDef="let row; columns: displayedColumns" mat-row></tr> |
|
|
|
<tr |
|
|
|
*matRowDef="let element; columns: displayedColumns" |
|
|
|
mat-row |
|
|
|
[ngClass]="{ |
|
|
|
'cursor-pointer': element.parents?.length > 0, |
|
|
|
expanded: element.expand ?? false |
|
|
|
}" |
|
|
|
(click)=" |
|
|
|
element.expand ? (element.expand = false) : (element.expand = true) |
|
|
|
" |
|
|
|
></tr> |
|
|
|
<tr |
|
|
|
*matRowDef="let row; columns: ['expandedDetail']" |
|
|
|
class="holding-detail" |
|
|
|
mat-row |
|
|
|
[ngClass]="{ 'd-none': !row.parents?.length }" |
|
|
|
></tr> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
|
|
|
|