feat: add password generation action to career application form
This commit is contained in:
@@ -9,6 +9,9 @@ use Filament\Forms\Components\TextInput;
|
|||||||
use Filament\Schemas\Components\Section;
|
use Filament\Schemas\Components\Section;
|
||||||
use Filament\Schemas\Schema;
|
use Filament\Schemas\Schema;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Filament\Actions\Action;
|
||||||
|
use Filament\Schemas\Components\Utilities\Set;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class CareerApplicationForm
|
class CareerApplicationForm
|
||||||
{
|
{
|
||||||
@@ -69,7 +72,12 @@ class CareerApplicationForm
|
|||||||
->dehydrateStateUsing(fn ($state) => filled($state) ? Hash::make($state) : null)
|
->dehydrateStateUsing(fn ($state) => filled($state) ? Hash::make($state) : null)
|
||||||
->dehydrated(fn ($state) => filled($state))
|
->dehydrated(fn ($state) => filled($state))
|
||||||
->placeholder('Şifreyi değiştirmek istemiyorsanız boş bırakın')
|
->placeholder('Şifreyi değiştirmek istemiyorsanız boş bırakın')
|
||||||
->nullable(),
|
->nullable()
|
||||||
|
->suffixAction(
|
||||||
|
Action::make('generatePassword')
|
||||||
|
->icon('heroicon-m-arrow-path')
|
||||||
|
->action(fn (Set $set) => $set('password', Str::random(12)))
|
||||||
|
),
|
||||||
|
|
||||||
FileUpload::make('signed_internship_form_path')
|
FileUpload::make('signed_internship_form_path')
|
||||||
->label('İmzalı Staj Formu')
|
->label('İmzalı Staj Formu')
|
||||||
|
|||||||
Reference in New Issue
Block a user