Browse Source

feat(client): resolve errors

pull/6892/head
KenTandrian 1 week ago
parent
commit
3562f1bd8e
  1. 22
      apps/client/src/app/components/admin-platform/admin-platform.component.ts

22
apps/client/src/app/components/admin-platform/admin-platform.component.ts

@ -86,7 +86,9 @@ export class GfAdminPlatformComponent implements OnInit {
return id === params['platformId']; return id === params['platformId'];
}); });
if (platform) {
this.openUpdatePlatformDialog(platform); this.openUpdatePlatformDialog(platform);
}
} else { } else {
this.router.navigate(['.'], { relativeTo: this.route }); this.router.navigate(['.'], { relativeTo: this.route });
} }
@ -156,13 +158,7 @@ export class GfAdminPlatformComponent implements OnInit {
GfCreateOrUpdatePlatformDialogComponent, GfCreateOrUpdatePlatformDialogComponent,
CreateOrUpdatePlatformDialogParams CreateOrUpdatePlatformDialogParams
>(GfCreateOrUpdatePlatformDialogComponent, { >(GfCreateOrUpdatePlatformDialogComponent, {
data: { data: {} satisfies CreateOrUpdatePlatformDialogParams,
platform: {
id: null,
name: null,
url: null
}
},
height: this.deviceType === 'mobile' ? '98vh' : undefined, height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '50rem' width: this.deviceType === 'mobile' ? '100vw' : '50rem'
}); });
@ -191,15 +187,7 @@ export class GfAdminPlatformComponent implements OnInit {
}); });
} }
private openUpdatePlatformDialog({ private openUpdatePlatformDialog({ id, name, url }: Platform) {
id,
name,
url
}: {
id: string;
name: string;
url: string;
}) {
const dialogRef = this.dialog.open< const dialogRef = this.dialog.open<
GfCreateOrUpdatePlatformDialogComponent, GfCreateOrUpdatePlatformDialogComponent,
CreateOrUpdatePlatformDialogParams CreateOrUpdatePlatformDialogParams
@ -210,7 +198,7 @@ export class GfAdminPlatformComponent implements OnInit {
name, name,
url url
} }
}, } satisfies CreateOrUpdatePlatformDialogParams,
height: this.deviceType === 'mobile' ? '98vh' : undefined, height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '50rem' width: this.deviceType === 'mobile' ? '100vw' : '50rem'
}); });

Loading…
Cancel
Save