From b328c060a728000779a61597d495762d0f209838 Mon Sep 17 00:00:00 2001 From: Vincent Auger Date: Wed, 4 Dec 2024 10:10:32 -0400 Subject: [PATCH] suggestions and fix seeder --- app/Filament/Resources/UserResource.php | 1 - app/Filament/Resources/UserResource/Pages/EditUser.php | 1 + database/seeders/DatabaseSeeder.php | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index ae083665..2001db6b 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -44,7 +44,6 @@ public static function form(Form $form): Form ->schema([ Forms\Components\Toggle::make('active') ->label('Activate User') - ->dehydrated(false) ->hidden(fn ($record) => $record && !$record->active) ->onColor('success'), Forms\Components\Actions::make([ diff --git a/app/Filament/Resources/UserResource/Pages/EditUser.php b/app/Filament/Resources/UserResource/Pages/EditUser.php index 27f87fe1..9246ecea 100644 --- a/app/Filament/Resources/UserResource/Pages/EditUser.php +++ b/app/Filament/Resources/UserResource/Pages/EditUser.php @@ -57,5 +57,6 @@ protected function getRedirectUrl(): string public function setVerifiedEmail(): void { $this->record->markEmailAsVerified(); + $this->refreshFormData(['active']); } } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index e5378354..cba2c3ab 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -30,7 +30,6 @@ public function run() $this->call([ LocalTestDataSeeder::class, ]); - $this->call(JournalsTableSeeder::class); } } }