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

Black Screen RelationManager #15450

Closed
tolgatasci opened this issue Jan 28, 2025 · 1 comment
Closed

Black Screen RelationManager #15450

tolgatasci opened this issue Jan 28, 2025 · 1 comment

Comments

@tolgatasci
Copy link

Package

filament/filament

Package Version

v3.2

Laravel Version

10.48.27

Livewire Version

No response

PHP Version

8.2.12

Problem description

I click New or Edit

Image

its looks like

Image

<?php

namespace App\Filament\Resources\WorkplaceResource\RelationManagers;

use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Model;

class BranchesRelationManager extends RelationManager
{
    protected static string $relationship = 'branches';

    protected static ?string $title = 'Şubeler';

    protected static ?string $label = 'Şube';

    protected static ?string $pluralLabel = 'Şubeler';


    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Grid::make()
                    ->schema([
                        Forms\Components\TextInput::make('branch_name')
                            ->label('Şube Adı')
                            ->required()
                            ->maxLength(255)
                            ->columnSpan(1),

                        Forms\Components\TextInput::make('ssk_branch_number')
                            ->label('SGK İşyeri Sicil No')
                            ->required()
                            ->unique(ignoreRecord: true)
                            ->columnSpan(1),

                        Forms\Components\TextInput::make('ssk_institution_name')
                            ->label('SSK Kurum Adı')
                            ->required()
                            ->columnSpan(1),

                        Forms\Components\TextInput::make('province')
                            ->label('İl')
                            ->required()
                            ->columnSpan(1),

                        Forms\Components\TextInput::make('district')
                            ->label('İlçe')
                            ->required()
                            ->columnSpan(1),

                        Forms\Components\TextInput::make('phone')
                            ->label('Telefon')
                            ->tel()
                            ->columnSpan(1),

                        Forms\Components\TextInput::make('email')
                            ->label('E-posta')
                            ->email()
                            ->columnSpan(1),

                        Forms\Components\Toggle::make('is_active')
                            ->label('Aktif')
                            ->default(true)
                            ->columnSpan(1),

                        Forms\Components\Textarea::make('address')
                            ->label('Adres')
                            ->columnSpan(2),
                    ])
                    ->columns(2),
            ]);
    }

    public function table(Table $table): Table
    {
        return $table
            ->recordTitleAttribute('branch_name')
            ->columns([
                Tables\Columns\TextColumn::make('branch_name')
                    ->label('Şube Adı')
                    ->searchable()
                    ->sortable(),

                Tables\Columns\TextColumn::make('ssk_branch_number')
                    ->label('SGK No')
                    ->searchable(),

                Tables\Columns\TextColumn::make('province')
                    ->label('İl')
                    ->searchable(),

                Tables\Columns\TextColumn::make('district')
                    ->label('İlçe')
                    ->searchable(),

                Tables\Columns\IconColumn::make('is_active')
                    ->label('Durum')
                    ->boolean(),

                Tables\Columns\TextColumn::make('activeEmployees_count')
                    ->counts('activeEmployees')
                    ->label('Aktif Çalışan'),
            ])
            ->filters([
                Tables\Filters\TernaryFilter::make('is_active')
                    ->label('Durum')
                    ->boolean()
                    ->trueLabel('Aktif')
                    ->falseLabel('Pasif')
                    ->placeholder('Tümü'),
            ])
            ->headerActions([
                Tables\Actions\CreateAction::make()
                    ->label('Şube Ekle')
                    ->modalWidth('4xl')
                    ->modalHeading('Yeni Şube Ekle')
                    ->createAnother(false),
            ])
            ->actions([
                Tables\Actions\EditAction::make()
                    ->modalWidth('4xl')
                    ->modalHeading('Şube Düzenle'),
                Tables\Actions\DeleteAction::make(),
            ])
            ->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    Tables\Actions\DeleteBulkAction::make(),
                ]),
            ]);
    }
}

Expected behavior

I will see form

Steps to reproduce

click new şube

i saw black screen

Reproduction repository (issue will be closed if this is not valid)

havent

Relevant log output

Copy link

Hey @tolgatasci! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Roadmap Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant