Skip to content

Commit

Permalink
fix imports for resource pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy132 committed Dec 7, 2024
1 parent 2865e17 commit eb9eca1
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 34 deletions.
5 changes: 3 additions & 2 deletions app/Filament/Admin/Resources/ApiKeyResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\ApiKeyResource\Pages;
use App\Models\ApiKey;
use Filament\Resources\Resource;
use Illuminate\Database\Eloquent\Model;
Expand Down Expand Up @@ -29,8 +30,8 @@ public static function canEdit(Model $record): bool
public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\ApiKeyResource\Pages\ListApiKeys::route('/'),
'create' => \App\Filament\Admin\Resources\ApiKeyResource\Pages\CreateApiKey::route('/create'),
'index' => Pages\ListApiKeys::route('/'),
'create' => Pages\CreateApiKey::route('/create'),
];
}
}
7 changes: 4 additions & 3 deletions app/Filament/Admin/Resources/DatabaseHostResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\DatabaseHostResource\Pages;
use App\Models\DatabaseHost;
use Filament\Resources\Resource;

Expand All @@ -23,9 +24,9 @@ public static function getNavigationBadge(): ?string
public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\DatabaseHostResource\Pages\ListDatabaseHosts::route('/'),
'create' => \App\Filament\Admin\Resources\DatabaseHostResource\Pages\CreateDatabaseHost::route('/create'),
'edit' => \App\Filament\Admin\Resources\DatabaseHostResource\Pages\EditDatabaseHost::route('/{record}/edit'),
'index' => Pages\ListDatabaseHosts::route('/'),
'create' => Pages\CreateDatabaseHost::route('/create'),
'edit' => Pages\EditDatabaseHost::route('/{record}/edit'),
];
}
}
7 changes: 4 additions & 3 deletions app/Filament/Admin/Resources/DatabaseResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\DatabaseResource\Pages;
use App\Models\Database;
use Filament\Resources\Resource;

Expand All @@ -23,9 +24,9 @@ public static function getNavigationBadge(): ?string
public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\DatabaseResource\Pages\ListDatabases::route('/'),
'create' => \App\Filament\Admin\Resources\DatabaseResource\Pages\CreateDatabase::route('/create'),
'edit' => \App\Filament\Admin\Resources\DatabaseResource\Pages\EditDatabase::route('/{record}/edit'),
'index' => Pages\ListDatabases::route('/'),
'create' => Pages\CreateDatabase::route('/create'),
'edit' => Pages\EditDatabase::route('/{record}/edit'),
];
}
}
7 changes: 4 additions & 3 deletions app/Filament/Admin/Resources/EggResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\EggResource\Pages;
use App\Models\Egg;
use Filament\Resources\Resource;

Expand All @@ -28,9 +29,9 @@ public static function getGloballySearchableAttributes(): array
public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\EggResource\Pages\ListEggs::route('/'),
'create' => \App\Filament\Admin\Resources\EggResource\Pages\CreateEgg::route('/create'),
'edit' => \App\Filament\Admin\Resources\EggResource\Pages\EditEgg::route('/{record}/edit'),
'index' => Pages\ListEggs::route('/'),
'create' => Pages\CreateEgg::route('/create'),
'edit' => Pages\EditEgg::route('/{record}/edit'),
];
}
}
7 changes: 4 additions & 3 deletions app/Filament/Admin/Resources/MountResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\MountResource\Pages;
use App\Models\Mount;
use Filament\Resources\Resource;

Expand All @@ -21,9 +22,9 @@ public static function getNavigationBadge(): ?string
public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\MountResource\Pages\ListMounts::route('/'),
'create' => \App\Filament\Admin\Resources\MountResource\Pages\CreateMount::route('/create'),
'edit' => \App\Filament\Admin\Resources\MountResource\Pages\EditMount::route('/{record}/edit'),
'index' => Pages\ListMounts::route('/'),
'create' => Pages\CreateMount::route('/create'),
'edit' => Pages\EditMount::route('/{record}/edit'),
];
}
}
14 changes: 7 additions & 7 deletions app/Filament/Admin/Resources/NodeResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\NodeResource\RelationManagers\AllocationsRelationManager;
use App\Filament\Admin\Resources\NodeResource\RelationManagers\NodesRelationManager;
use App\Filament\Admin\Resources\NodeResource\Pages;
use App\Filament\Admin\Resources\NodeResource\RelationManagers;
use App\Models\Node;
use Filament\Resources\Resource;

Expand All @@ -23,17 +23,17 @@ public static function getNavigationBadge(): ?string
public static function getRelations(): array
{
return [
AllocationsRelationManager::class,
NodesRelationManager::class,
RelationManagers\AllocationsRelationManager::class,
RelationManagers\NodesRelationManager::class,
];
}

public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\NodeResource\Pages\ListNodes::route('/'),
'create' => \App\Filament\Admin\Resources\NodeResource\Pages\CreateNode::route('/create'),
'edit' => \App\Filament\Admin\Resources\NodeResource\Pages\EditNode::route('/{record}/edit'),
'index' => Pages\ListNodes::route('/'),
'create' => Pages\CreateNode::route('/create'),
'edit' => Pages\EditNode::route('/{record}/edit'),
];
}
}
7 changes: 4 additions & 3 deletions app/Filament/Admin/Resources/RoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Enums\RolePermissionModels;
use App\Enums\RolePermissionPrefixes;
use App\Filament\Admin\Resources\RoleResource\Pages;
use App\Models\Role;
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Components\CheckboxList;
Expand Down Expand Up @@ -138,9 +139,9 @@ function (Component $component, string $operation, ?Role $record) use ($options)
public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\RoleResource\Pages\ListRoles::route('/'),
'create' => \App\Filament\Admin\Resources\RoleResource\Pages\CreateRole::route('/create'),
'edit' => \App\Filament\Admin\Resources\RoleResource\Pages\EditRole::route('/{record}/edit'),
'index' => Pages\ListRoles::route('/'),
'create' => Pages\CreateRole::route('/create'),
'edit' => Pages\EditRole::route('/{record}/edit'),
];
}
}
7 changes: 4 additions & 3 deletions app/Filament/Admin/Resources/ServerResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\ServerResource\Pages;
use App\Models\Server;
use Filament\Resources\Resource;

Expand All @@ -21,9 +22,9 @@ public static function getNavigationBadge(): ?string
public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\ServerResource\Pages\ListServers::route('/'),
'create' => \App\Filament\Admin\Resources\ServerResource\Pages\CreateServer::route('/create'),
'edit' => \App\Filament\Admin\Resources\ServerResource\Pages\EditServer::route('/{record}/edit'),
'index' => Pages\ListServers::route('/'),
'create' => Pages\CreateServer::route('/create'),
'edit' => Pages\EditServer::route('/{record}/edit'),
];
}
}
9 changes: 5 additions & 4 deletions app/Filament/Admin/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\UserResource\RelationManagers\ServersRelationManager;
use App\Filament\Admin\Resources\UserResource\Pages;
use App\Filament\Admin\Resources\UserResource\RelationManagers;
use App\Models\User;
use Filament\Resources\Resource;

Expand All @@ -22,15 +23,15 @@ public static function getNavigationBadge(): ?string
public static function getRelations(): array
{
return [
ServersRelationManager::class,
RelationManagers\ServersRelationManager::class,
];
}

public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\UserResource\Pages\ListUsers::route('/'),
'edit' => \App\Filament\Admin\Resources\UserResource\Pages\EditUser::route('/{record}/edit'),
'index' => Pages\ListUsers::route('/'),
'edit' => Pages\EditUser::route('/{record}/edit'),
];
}
}
7 changes: 4 additions & 3 deletions app/Filament/Admin/Resources/WebhookResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\WebhookResource\Pages;
use App\Models\WebhookConfiguration;
use Filament\Resources\Resource;

Expand All @@ -23,9 +24,9 @@ public static function getNavigationBadge(): ?string
public static function getPages(): array
{
return [
'index' => \App\Filament\Admin\Resources\WebhookResource\Pages\ListWebhookConfigurations::route('/'),
'create' => \App\Filament\Admin\Resources\WebhookResource\Pages\CreateWebhookConfiguration::route('/create'),
'edit' => \App\Filament\Admin\Resources\WebhookResource\Pages\EditWebhookConfiguration::route('/{record}/edit'),
'index' => Pages\ListWebhookConfigurations::route('/'),
'create' => Pages\CreateWebhookConfiguration::route('/create'),
'edit' => Pages\EditWebhookConfiguration::route('/{record}/edit'),
];
}
}

0 comments on commit eb9eca1

Please sign in to comment.