From 6df731b1a66a13fddaf6fd560bf9eca4b0f97bd4 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 26 Jan 2026 21:34:06 +0100 Subject: [PATCH] Refactoring --- .../admin-market-data.component.ts | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts index 823ae0c41..8f956b782 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts @@ -416,26 +416,6 @@ export class GfAdminMarketDataComponent }); } - private refreshTable() { - this.isLoading = true; - this.changeDetectorRef.markForCheck(); - - this.adminService - .fetchAdminMarketData({ - filters: this.activeFilters, - take: this.pageSize - }) - .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(({ marketData }) => { - this.dataSource = new MatTableDataSource(marketData); - this.dataSource.sort = this.sort; - - this.isLoading = false; - - this.changeDetectorRef.markForCheck(); - }); - } - private openAssetProfileDialog({ dataSource, symbol @@ -504,6 +484,8 @@ export class GfAdminMarketDataComponent .pipe(takeUntil(this.unsubscribeSubject)) .subscribe((result) => { if (!result) { + this.router.navigate(['.'], { relativeTo: this.route }); + return; } @@ -514,13 +496,13 @@ export class GfAdminMarketDataComponent .addAssetProfile({ dataSource, symbol }) .pipe(takeUntil(this.unsubscribeSubject)) .subscribe(() => { - this.refreshTable(); + this.loadData(); }); } else { - this.refreshTable(); + this.loadData(); } - this.router.navigate(['.'], { relativeTo: this.route }); + this.onOpenAssetProfileDialog({ dataSource, symbol }); }); }); }