Feature/reload platform and tag on change (#2417)
* Reload platforms via info * Reload tags via info * Update changelog
This commit is contained in:
@@ -13,6 +13,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { CreatePlatformDto } from '@ghostfolio/api/app/platform/create-platform.dto';
|
||||
import { UpdatePlatformDto } from '@ghostfolio/api/app/platform/update-platform.dto';
|
||||
import { AdminService } from '@ghostfolio/client/services/admin.service';
|
||||
import { DataService } from '@ghostfolio/client/services/data.service';
|
||||
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
||||
import { Platform } from '@prisma/client';
|
||||
import { get } from 'lodash';
|
||||
@@ -40,6 +41,7 @@ export class AdminPlatformComponent implements OnInit, OnDestroy {
|
||||
public constructor(
|
||||
private adminService: AdminService,
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private dataService: DataService,
|
||||
private deviceService: DeviceDetectorService,
|
||||
private dialog: MatDialog,
|
||||
private route: ActivatedRoute,
|
||||
@@ -119,6 +121,8 @@ export class AdminPlatformComponent implements OnInit, OnDestroy {
|
||||
this.dataSource.sort = this.sort;
|
||||
this.dataSource.sortingDataAccessor = get;
|
||||
|
||||
this.dataService.updateInfo();
|
||||
|
||||
this.changeDetectorRef.markForCheck();
|
||||
});
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { CreateTagDto } from '@ghostfolio/api/app/tag/create-tag.dto';
|
||||
import { UpdateTagDto } from '@ghostfolio/api/app/tag/update-tag.dto';
|
||||
import { AdminService } from '@ghostfolio/client/services/admin.service';
|
||||
import { DataService } from '@ghostfolio/client/services/data.service';
|
||||
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
||||
import { Tag } from '@prisma/client';
|
||||
import { get } from 'lodash';
|
||||
@@ -40,6 +41,7 @@ export class AdminTagComponent implements OnInit, OnDestroy {
|
||||
public constructor(
|
||||
private adminService: AdminService,
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private dataService: DataService,
|
||||
private deviceService: DeviceDetectorService,
|
||||
private dialog: MatDialog,
|
||||
private route: ActivatedRoute,
|
||||
@@ -114,10 +116,13 @@ export class AdminTagComponent implements OnInit, OnDestroy {
|
||||
.pipe(takeUntil(this.unsubscribeSubject))
|
||||
.subscribe((tags) => {
|
||||
this.tags = tags;
|
||||
|
||||
this.dataSource = new MatTableDataSource(this.tags);
|
||||
this.dataSource.sort = this.sort;
|
||||
this.dataSource.sortingDataAccessor = get;
|
||||
|
||||
this.dataService.updateInfo();
|
||||
|
||||
this.changeDetectorRef.markForCheck();
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user