Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filament admin panel rendering issue fix #234

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions app/Filament/Admin/Pages/Dashboard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace App\Filament\Admin\Pages;

use Filament\Pages\Page;
class Dashboard extends Page
{

public static ?string $title = 'Dashboard';

public static $icon = 'heroicon-o-home';

public static string $view = 'filament.pages.dashboard';

}
36 changes: 18 additions & 18 deletions app/Providers/Filament/AppPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public function panel(Panel $panel): Panel
->default()
->id('app')
->path('app')
->login([AuthenticatedSessionController::class, 'create'])
->registration()
->passwordReset()
->emailVerification()
// ->login([AuthenticatedSessionController::class, 'create'])
// ->registration()
// ->passwordReset()
// ->emailVerification()
->viteTheme('resources/css/filament/admin/theme.css')
->colors([
'primary' => Color::Gray,
Expand Down Expand Up @@ -98,20 +98,20 @@ public function panel(Panel $panel): Panel
// ]);
// }

if (Features::hasTeamFeatures()) {
$panel
->tenant(Team::class, ownershipRelationship: 'team')
->tenantRegistration(Pages\CreateTeam::class)
->tenantProfile(Pages\EditTeam::class)
->userMenuItems([
MenuItem::make()
->label('Team Settings')
->icon('heroicon-o-cog-6-tooth')
->url(fn () => $this->shouldRegisterMenuItem()
? url(Pages\EditTeam::getUrl())
: url($panel->getPath())),
]);
}
// if (Features::hasTeamFeatures()) {
// $panel
// ->tenant(Team::class, ownershipRelationship: 'team')
// ->tenantRegistration(Pages\CreateTeam::class)
// ->tenantProfile(Pages\EditTeam::class)
// ->userMenuItems([
// MenuItem::make()
// ->label('Team Settings')
// ->icon('heroicon-o-cog-6-tooth')
// ->url(fn () => $this->shouldRegisterMenuItem()
// ? url(Pages\EditTeam::getUrl())
// : url($panel->getPath())),
// ]);
// }

return $panel;
}
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RouteServiceProvider extends ServiceProvider
*
* @var string
*/
public const HOME = '/admin';
public const HOME = '/admin/dashboard';

/**
* Define your route model bindings, pattern filters, and other route configuration.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"license": "MIT",
"require": {
"php": "^8.2",
"bezhansalleh/filament-shield": "*",
"filament/filament": "*",
"bezhansalleh/filament-shield": "^3.2",
"guzzlehttp/guzzle": "^7.8",
"joelbutcher/socialstream": "*",
"laravel/framework": "^11.0",
Expand All @@ -26,6 +25,7 @@
},
"require-dev": {
"fakerphp/faker": "^1.23",
"filament/filament": "^3.2",
"laravel/pint": "^1.14",
"laravel/sail": "^1.28",
"mockery/mockery": "^1.6",
Expand Down
80 changes: 40 additions & 40 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion public/build/assets/app-4H06IkzR.css

This file was deleted.

1 change: 1 addition & 0 deletions public/build/assets/app-Dj3lq3wS.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resources/css/app.css": {
"file": "assets/app-4H06IkzR.css",
"file": "assets/app-Dj3lq3wS.css",
"src": "resources/css/app.css",
"isEntry": true
},
Expand Down
2 changes: 1 addition & 1 deletion public/js/filament/forms/components/date-time-picker.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions public/js/filament/forms/components/file-upload.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/filament/forms/components/textarea.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 1 addition & 29 deletions resources/views/filament/pages/dashboard.blade.php
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
<x-filament-panels::page>
<x-filament::grid columns="4">
<x-filament::grid.column>
<x-filament::card>
<h2 class="text-lg font-semibold">TEST</h2>
<p class="text-3xl font-bold"> 100 </p>
</x-filament::card>
</x-filament::grid.column>

<x-filament::grid.column>
<x-filament::card>
<h2 class="text-lg font-semibold">TEST</h2>
<p class="text-3xl font-bold"> 100 </p>
</x-filament::card>
</x-filament::grid.column>

<x-filament::grid.column>
<x-filament::card>
<h2 class="text-lg font-semibold">TEST</h2>
<p class="text-3xl font-bold"> 100 </p>
</x-filament::card>
</x-filament::grid.column>

<x-filament::grid.column>
<x-filament::card>
<h2 class="text-lg font-semibold">TEST</h2>
<p class="text-3xl font-bold"> 100 </p>
</x-filament::card>
</x-filament::grid.column>
</x-filament::grid>


<x-filament::card class="mt-6">
<h2 class="text-lg font-semibold mb-4">App Recent Activity</h2>
Expand Down
Loading
Loading