|
|
@ -36,6 +36,7 @@ import { |
|
|
trashOutline |
|
|
trashOutline |
|
|
} from 'ionicons/icons'; |
|
|
} from 'ionicons/icons'; |
|
|
import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
|
|
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
|
|
|
|
|
|
|
|
import { GfCreateOrUpdatePlatformDialogComponent } from './create-or-update-platform-dialog/create-or-update-platform-dialog.component'; |
|
|
import { GfCreateOrUpdatePlatformDialogComponent } from './create-or-update-platform-dialog/create-or-update-platform-dialog.component'; |
|
|
import { CreateOrUpdatePlatformDialogParams } from './create-or-update-platform-dialog/interfaces/interfaces'; |
|
|
import { CreateOrUpdatePlatformDialogParams } from './create-or-update-platform-dialog/interfaces/interfaces'; |
|
|
@ -51,6 +52,7 @@ import { CreateOrUpdatePlatformDialogParams } from './create-or-update-platform- |
|
|
MatPaginatorModule, |
|
|
MatPaginatorModule, |
|
|
MatSortModule, |
|
|
MatSortModule, |
|
|
MatTableModule, |
|
|
MatTableModule, |
|
|
|
|
|
NgxSkeletonLoaderModule, |
|
|
RouterModule |
|
|
RouterModule |
|
|
], |
|
|
], |
|
|
selector: 'gf-admin-platform', |
|
|
selector: 'gf-admin-platform', |
|
|
@ -61,6 +63,7 @@ export class GfAdminPlatformComponent implements OnInit { |
|
|
public readonly locale = input(getLocale()); |
|
|
public readonly locale = input(getLocale()); |
|
|
|
|
|
|
|
|
protected dataSource = new MatTableDataSource<Platform>(); |
|
|
protected dataSource = new MatTableDataSource<Platform>(); |
|
|
|
|
|
|
|
|
protected readonly displayedColumns = [ |
|
|
protected readonly displayedColumns = [ |
|
|
'icon', |
|
|
'icon', |
|
|
'name', |
|
|
'name', |
|
|
@ -68,12 +71,15 @@ export class GfAdminPlatformComponent implements OnInit { |
|
|
'accounts', |
|
|
'accounts', |
|
|
'actions' |
|
|
'actions' |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
protected isLoading = false; |
|
|
protected readonly pageSize = DEFAULT_PAGE_SIZE; |
|
|
protected readonly pageSize = DEFAULT_PAGE_SIZE; |
|
|
protected platforms: Platform[]; |
|
|
protected platforms: Platform[]; |
|
|
|
|
|
|
|
|
private readonly deviceType = computed( |
|
|
private readonly deviceType = computed( |
|
|
() => this.deviceDetectorService.deviceInfo().deviceType |
|
|
() => this.deviceDetectorService.deviceInfo().deviceType |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
private readonly paginator = viewChild.required(MatPaginator); |
|
|
private readonly paginator = viewChild.required(MatPaginator); |
|
|
private readonly sort = viewChild.required(MatSort); |
|
|
private readonly sort = viewChild.required(MatSort); |
|
|
|
|
|
|
|
|
@ -149,6 +155,8 @@ export class GfAdminPlatformComponent implements OnInit { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private fetchPlatforms() { |
|
|
private fetchPlatforms() { |
|
|
|
|
|
this.isLoading = true; |
|
|
|
|
|
|
|
|
this.adminService |
|
|
this.adminService |
|
|
.fetchPlatforms() |
|
|
.fetchPlatforms() |
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
@ -162,6 +170,8 @@ export class GfAdminPlatformComponent implements OnInit { |
|
|
|
|
|
|
|
|
this.dataService.updateInfo(); |
|
|
this.dataService.updateInfo(); |
|
|
|
|
|
|
|
|
|
|
|
this.isLoading = false; |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|