oculorum
oculorum
FFilament
Created by oculorum on 4/21/2025 in #❓┊help
Problem with Viewing Related Records in RelationManager
<x-filament-panels::page>
@if ($this->hasInfolist())
{{ $this->infolist }}
@else
{{ $this->form }}
@endif

@if (count($relationManagers = $this->getRelationManagers()))
<x-filament-panels::resources.relation-managers
:active-manager="$this->activeRelationManager"
:managers="$relationManagers"
:owner-record="$record"
:page-class="static::class"
/>
@endif
</x-filament-panels::page>
<x-filament-panels::page>
@if ($this->hasInfolist())
{{ $this->infolist }}
@else
{{ $this->form }}
@endif

@if (count($relationManagers = $this->getRelationManagers()))
<x-filament-panels::resources.relation-managers
:active-manager="$this->activeRelationManager"
:managers="$relationManagers"
:owner-record="$record"
:page-class="static::class"
/>
@endif
</x-filament-panels::page>
5 replies
FFilament
Created by oculorum on 4/21/2025 in #❓┊help
Problem with Viewing Related Records in RelationManager
class ImportedRowsRelationManager extends RelationManager
{
protected static string $relationship = 'dataImportedRows';

public function table(Table $table): Table
{
return $table
->recordTitleAttribute(attribute: 'data')
->columns(components: [
Tables\Columns\TextColumn::make(name: 'error_message')
->label(label: __(key: 'filament/admin.attributes.error_message'))
->wrap(),
Tables\Columns\TextColumn::make(name: 'processed_at')
->label(label: __(key: 'filament/common.timestamps.processed_at'))
->sortable(),
])
->filters(filters: [
])
->headerActions(actions: [
])
->actions(actions: [
Tables\Actions\ViewAction::make()
->infolist(infolist: static function (Infolist $infolist, Model $record): Infolist {
return $infolist
->schema(components: [
Infolists\Components\TextEntry::make(name: 'error_message')
->label(__(key: 'filament/admin.attributes.error_message')),
Infolists\Components\IconEntry::make(name: 'is_valid')
->label(__(key: 'filament/admin.attributes.is_valid'))
->boolean(),
]);
}),
])
->bulkActions(actions: [
]);
}
}
class ImportedRowsRelationManager extends RelationManager
{
protected static string $relationship = 'dataImportedRows';

public function table(Table $table): Table
{
return $table
->recordTitleAttribute(attribute: 'data')
->columns(components: [
Tables\Columns\TextColumn::make(name: 'error_message')
->label(label: __(key: 'filament/admin.attributes.error_message'))
->wrap(),
Tables\Columns\TextColumn::make(name: 'processed_at')
->label(label: __(key: 'filament/common.timestamps.processed_at'))
->sortable(),
])
->filters(filters: [
])
->headerActions(actions: [
])
->actions(actions: [
Tables\Actions\ViewAction::make()
->infolist(infolist: static function (Infolist $infolist, Model $record): Infolist {
return $infolist
->schema(components: [
Infolists\Components\TextEntry::make(name: 'error_message')
->label(__(key: 'filament/admin.attributes.error_message')),
Infolists\Components\IconEntry::make(name: 'is_valid')
->label(__(key: 'filament/admin.attributes.is_valid'))
->boolean(),
]);
}),
])
->bulkActions(actions: [
]);
}
}
5 replies
FFilament
Created by oculorum on 4/21/2025 in #❓┊help
Problem with Viewing Related Records in RelationManager
class ViewDataImport extends ViewRecord
{
protected static string $resource = DataImportResource::class;

protected static string $view = 'filament.admin.data-import.view-data-import';

public function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema(components: [
Infolists\Components\Section::make(heading: __(key: 'filament/admin.sections.basic_information'))
->schema(components: [
Infolists\Components\Grid::make()
->schema(components: [
Infolists\Components\TextEntry::make(name: 'file_path')
->label(label: __(key: 'filament/admin.attributes.file_path')),
Infolists\Components\TextEntry::make(name: 'status')
->label(label: __(key: 'filament/common.attributes.status'))
->badge(),
])
->columns(columns: 3),
Infolists\Components\TextEntry::make(name: 'total_rows')
->label(label: __(key: 'filament/admin.attributes.total_rows'))
->numeric(),
Infolists\Components\TextEntry::make(name: 'success_count')
->label(label: __(key: 'filament/admin.attributes.success_count'))
->numeric(),
Infolists\Components\TextEntry::make(name: 'failure_count')
->label(label: __(key: 'filament/admin.attributes.failure_count'))
->numeric(),
])
->columns(columns: 3),
]);
}
}
class ViewDataImport extends ViewRecord
{
protected static string $resource = DataImportResource::class;

protected static string $view = 'filament.admin.data-import.view-data-import';

public function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema(components: [
Infolists\Components\Section::make(heading: __(key: 'filament/admin.sections.basic_information'))
->schema(components: [
Infolists\Components\Grid::make()
->schema(components: [
Infolists\Components\TextEntry::make(name: 'file_path')
->label(label: __(key: 'filament/admin.attributes.file_path')),
Infolists\Components\TextEntry::make(name: 'status')
->label(label: __(key: 'filament/common.attributes.status'))
->badge(),
])
->columns(columns: 3),
Infolists\Components\TextEntry::make(name: 'total_rows')
->label(label: __(key: 'filament/admin.attributes.total_rows'))
->numeric(),
Infolists\Components\TextEntry::make(name: 'success_count')
->label(label: __(key: 'filament/admin.attributes.success_count'))
->numeric(),
Infolists\Components\TextEntry::make(name: 'failure_count')
->label(label: __(key: 'filament/admin.attributes.failure_count'))
->numeric(),
])
->columns(columns: 3),
]);
}
}
5 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
Update! I am using the latest Macbook with M4 proc and docker. You need to activate the Docker VMM option in Docker (https://github.com/docker/for-mac/issues/7255#issuecomment-2567154899) to fix this problem.
16 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
We'll see when I bump up to L12 and update the libraries, as it may be a Franken HTTP server issue.
16 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
Update! On the server the same code works correctly. On the other hand, locally I have a problem. Maybe you have a suggestion what I can do.
16 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
It is strange that I have such a situation in separate two projects. It appeared suddenly. Maybe updating php to 8.4.5 or installing node js may have affected this.
16 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
What information do you need? I have a panel with several resources. It uses the default solutions filament. I have some mutations. The problem is strange because it kind of affects all resources in the panel. When the create or save action appears such an error. nevertheless, one time it saves/creates, but does not redirect and further in the console you can see the message.
16 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
Of course I use.
16 replies
FFilament
Created by oculorum on 4/14/2025 in #❓┊help
Problem with Filament and Livewire - no data saving, console error
16 replies