diff --git a/app/Filament/Pages/HomePageSettings.php b/app/Filament/Pages/HomePageSettings.php index a3dfbda..7dfe4a5 100644 --- a/app/Filament/Pages/HomePageSettings.php +++ b/app/Filament/Pages/HomePageSettings.php @@ -146,7 +146,6 @@ class HomePageSettings extends SettingsPage FileUpload::make('bg_video') ->label('Background Video') ->acceptedFileTypes(['video/mp4', 'video/webm', 'video/ogg']) - ->maxSize(51200) // 50MB ->disk('public') ->directory('homepage-videos') ->required(), diff --git a/app/Filament/Resources/ApplicationResource.php b/app/Filament/Resources/ApplicationResource.php new file mode 100644 index 0000000..41102b9 --- /dev/null +++ b/app/Filament/Resources/ApplicationResource.php @@ -0,0 +1,110 @@ +schema([ + Forms\Components\Select::make('career_id') + ->label('Career') + ->options(Career::all()->pluck('title', 'id')) + ->searchable() + ->required(), + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + Forms\Components\DatePicker::make('birthdate') + ->required(), + Forms\Components\TextInput::make('email') + ->email() + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('phone_number') + ->maxLength(255), + Forms\Components\FileUpload::make('resume_file') + ->required() + ->disk('public') + ->directory('resumes') + ->enableDownload() + ->enableOpen(), + Forms\Components\RichEditor::make('cover_letter') + ->columnSpan('full'), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('career.title') + ->searchable() + ->sortable(), + Tables\Columns\TextColumn::make('name') + ->searchable(), + Tables\Columns\TextColumn::make('email') + ->searchable(), + Tables\Columns\TextColumn::make('phone_number') + ->searchable(), + Tables\Columns\TextColumn::make('birthdate') + ->date() + ->sortable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListApplications::route('/'), + 'create' => Pages\CreateApplication::route('/create'), + 'edit' => Pages\EditApplication::route('/{record}/edit'), + ]; + } +} \ No newline at end of file diff --git a/app/Filament/Resources/ApplicationResource/Pages/CreateApplication.php b/app/Filament/Resources/ApplicationResource/Pages/CreateApplication.php new file mode 100644 index 0000000..ad08902 --- /dev/null +++ b/app/Filament/Resources/ApplicationResource/Pages/CreateApplication.php @@ -0,0 +1,12 @@ +resources([ config('filament-logger.activity_resource'), + ApplicationResource::class, ]); } }