Browse Source

fix(lib): evaluate member visibility

pull/6555/head
KenTandrian 3 weeks ago
parent
commit
300ff78a1d
  1. 32
      libs/ui/src/lib/benchmark/benchmark.component.ts

32
libs/ui/src/lib/benchmark/benchmark.component.ts

@ -72,29 +72,28 @@ export class GfBenchmarkComponent implements OnChanges {
@Output() itemDeleted = new EventEmitter<AssetProfileIdentifier>(); @Output() itemDeleted = new EventEmitter<AssetProfileIdentifier>();
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) protected sort: MatSort;
public dataSource = new MatTableDataSource<Benchmark>([]); protected readonly dataSource = new MatTableDataSource<Benchmark>([]);
public displayedColumns = [ protected displayedColumns = [
'name', 'name',
'date', 'date',
'change', 'change',
'marketCondition', 'marketCondition',
'actions' 'actions'
]; ];
public isLoading = true; protected isLoading = true;
public isNumber = isNumber; protected readonly isNumber = isNumber;
public resolveMarketCondition = resolveMarketCondition; protected readonly resolveMarketCondition = resolveMarketCondition;
public translate = translate; protected readonly translate = translate;
private readonly destroyRef = inject(DestroyRef); private readonly destroyRef = inject(DestroyRef);
private readonly dialog = inject(MatDialog);
private readonly notificationService = inject(NotificationService);
private readonly route = inject(ActivatedRoute);
private readonly router = inject(Router);
public constructor( public constructor() {
private dialog: MatDialog,
private notificationService: NotificationService,
private route: ActivatedRoute,
private router: Router
) {
this.route.queryParams this.route.queryParams
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((params) => { .subscribe((params) => {
@ -136,7 +135,7 @@ export class GfBenchmarkComponent implements OnChanges {
} }
} }
public onDeleteItem({ dataSource, symbol }: AssetProfileIdentifier) { protected onDeleteItem({ dataSource, symbol }: AssetProfileIdentifier) {
this.notificationService.confirm({ this.notificationService.confirm({
confirmFn: () => { confirmFn: () => {
this.itemDeleted.emit({ dataSource, symbol }); this.itemDeleted.emit({ dataSource, symbol });
@ -146,7 +145,10 @@ export class GfBenchmarkComponent implements OnChanges {
}); });
} }
public onOpenBenchmarkDialog({ dataSource, symbol }: AssetProfileIdentifier) { protected onOpenBenchmarkDialog({
dataSource,
symbol
}: AssetProfileIdentifier) {
this.router.navigate([], { this.router.navigate([], {
queryParams: { dataSource, symbol, benchmarkDetailDialog: true } queryParams: { dataSource, symbol, benchmarkDetailDialog: true }
}); });

Loading…
Cancel
Save