|
|
@ -9,12 +9,11 @@ import { |
|
|
CUSTOM_ELEMENTS_SCHEMA, |
|
|
CUSTOM_ELEMENTS_SCHEMA, |
|
|
ChangeDetectionStrategy, |
|
|
ChangeDetectionStrategy, |
|
|
Component, |
|
|
Component, |
|
|
EventEmitter, |
|
|
|
|
|
Input, |
|
|
|
|
|
Output, |
|
|
|
|
|
computed, |
|
|
computed, |
|
|
effect, |
|
|
effect, |
|
|
input, |
|
|
input, |
|
|
|
|
|
model, |
|
|
|
|
|
output, |
|
|
viewChild |
|
|
viewChild |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
@ -47,17 +46,17 @@ import { GfValueComponent } from '../value/value.component'; |
|
|
templateUrl: './holdings-table.component.html' |
|
|
templateUrl: './holdings-table.component.html' |
|
|
}) |
|
|
}) |
|
|
export class GfHoldingsTableComponent { |
|
|
export class GfHoldingsTableComponent { |
|
|
@Input() pageSize = Number.MAX_SAFE_INTEGER; |
|
|
|
|
|
|
|
|
|
|
|
@Output() holdingClicked = new EventEmitter<AssetProfileIdentifier>(); |
|
|
|
|
|
|
|
|
|
|
|
public readonly hasPermissionToOpenDetails = input(true); |
|
|
public readonly hasPermissionToOpenDetails = input(true); |
|
|
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 locale = input(getLocale()); |
|
|
public readonly paginator = viewChild.required(MatPaginator); |
|
|
public readonly pageSize = model(Number.MAX_SAFE_INTEGER); |
|
|
public readonly sort = viewChild.required(MatSort); |
|
|
|
|
|
|
|
|
public readonly holdingClicked = output<AssetProfileIdentifier>(); |
|
|
|
|
|
|
|
|
|
|
|
protected readonly paginator = viewChild.required(MatPaginator); |
|
|
|
|
|
protected readonly sort = viewChild.required(MatSort); |
|
|
|
|
|
|
|
|
protected readonly dataSource = new MatTableDataSource<PortfolioPosition>([]); |
|
|
protected readonly dataSource = new MatTableDataSource<PortfolioPosition>([]); |
|
|
|
|
|
|
|
|
@ -106,7 +105,7 @@ export class GfHoldingsTableComponent { |
|
|
protected canShowDetails(holding: PortfolioPosition): boolean { |
|
|
protected canShowDetails(holding: PortfolioPosition): boolean { |
|
|
return ( |
|
|
return ( |
|
|
this.hasPermissionToOpenDetails() && |
|
|
this.hasPermissionToOpenDetails() && |
|
|
!this.ignoreAssetSubClasses.includes(holding.assetSubClass) |
|
|
!this.ignoreAssetSubClasses.includes(holding.assetProfile.assetSubClass) |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -118,7 +117,7 @@ export class GfHoldingsTableComponent { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected onShowAllHoldings() { |
|
|
protected onShowAllHoldings() { |
|
|
this.pageSize = Number.MAX_SAFE_INTEGER; |
|
|
this.pageSize.set(Number.MAX_SAFE_INTEGER); |
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.dataSource.paginator = this.paginator(); |
|
|
this.dataSource.paginator = this.paginator(); |
|
|
|