Files
citrus/app/Filament/Admin/Resources/CareerApplications/Schemas/CareerApplicationForm.php
T

85 lines
3.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Filament\Admin\Resources\CareerApplications\Schemas;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
use Illuminate\Support\Facades\Hash;
class CareerApplicationForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('name')
->label(__('career.name'))
->required()
->disabled(),
TextInput::make('email')
->label(__('career.email'))
->email()
->required()
->disabled(),
TextInput::make('phone')
->label(__('career.phone'))
->disabled(),
FileUpload::make('cv_path')
->label(__('career.cv'))
->disk('public')
->directory('cvs')
->required()
->disabled()
->downloadable(),
Textarea::make('message')
->label(__('career.message'))
->disabled()
->columnSpanFull(),
Select::make('status')
->label(__('career.status'))
->options([
'pending' => 'Pending',
'reviewed' => 'Reviewed',
'rejected' => 'Rejected',
'accepted' => 'Accepted',
])
->required(),
Section::make('Stajyer Giriş Bilgileri & Belgeleri')
->description('Stajyerin sisteme giriş yapabilmesi için kullanıcı adı, şifre belirleyin ve imzalı staj formunu yükleyin.')
->collapsible()
->schema([
TextInput::make('username')
->label('Kullanıcı Adı')
->unique(ignoreRecord: true)
->nullable(),
TextInput::make('password')
->label('Şifre')
->password()
->dehydrateStateUsing(fn ($state) => filled($state) ? Hash::make($state) : null)
->dehydrated(fn ($state) => filled($state))
->placeholder('Şifreyi değiştirmek istemiyorsanız boş bırakın')
->nullable(),
FileUpload::make('signed_internship_form_path')
->label('İmzalı Staj Formu')
->disk('public')
->directory('signed_interns')
->downloadable()
->nullable(),
])
->columnSpanFull(),
]);
}
}