Wazza
Wazza
FFilament
Created by Wazza on 4/8/2024 in #❓┊help
ImportAction Custom Page
Hey friends, I am having a little issue using Importer on a custom page
class Developer extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.developer';

public function importProductSuppliersAction()
{
return \Filament\Actions\ImportAction::make()
->label('Sync Products And Suppliers')
->importer(ProductSuppliersImporter::class);
}
class Developer extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.developer';

public function importProductSuppliersAction()
{
return \Filament\Actions\ImportAction::make()
->label('Sync Products And Suppliers')
->importer(ProductSuppliersImporter::class);
}
In my blade file, I have
<x-filament::section>
<x-slot name="heading">
Import CSV's Section
</x-slot>
<div>
{{ $this->importProductSuppliersAction }}
</div>
</x-filament::section>
<x-filament::section>
<x-slot name="heading">
Import CSV's Section
</x-slot>
<div>
{{ $this->importProductSuppliersAction }}
</div>
</x-filament::section>
And it does not trigger the import not sure if I've done something very wrong here 😭
2 replies
FFilament
Created by Wazza on 2/29/2024 in #❓┊help
Custom page adding to tabs
No description
2 replies
FFilament
Created by Wazza on 11/22/2023 in #❓┊help
Set Select Option After createOptionForm
Hey everyone just looking for some advice, how could I set the value of the select option to the newly created on that I have created using the createOptionForm below is my select component
Forms\Components\Select::make('industry_id')
->label('Industry')
->relationship(name: 'industry', titleAttribute: 'name')
->options(
Industry::all()->pluck('name', 'id')
)->createOptionForm([
Forms\Components\TextInput::make('name')
->required(),
])
->live(),
Forms\Components\Select::make('industry_id')
->label('Industry')
->relationship(name: 'industry', titleAttribute: 'name')
->options(
Industry::all()->pluck('name', 'id')
)->createOptionForm([
Forms\Components\TextInput::make('name')
->required(),
])
->live(),
Any help would be great, thank you in advance
3 replies
FFilament
Created by Wazza on 9/27/2023 in #❓┊help
Widget error $tableColumnSearches
No description
12 replies
FFilament
Created by Wazza on 8/27/2023 in #❓┊help
Relationship manager form tabs
6 replies
FFilament
Created by Wazza on 8/16/2023 in #❓┊help
Refresh RelationManager on dropdown
Hi all you smart individuals, I have a question about relationshipmanagers, I have one in my system call teams and Im wanting to filter the Relationship Manager by the organisaiton ID that is passed in, however it would be nice iff I could update the relationshipmanager when I changhe the option in my drop down
Forms\Components\Section::make('Associated Organisation')->schema([
Forms\Components\Select::make('organisation_id')
->label('Organisation')
->required()
->options(Organisation::all()->pluck('name', 'id'))
->live(),
]),
Forms\Components\Section::make('Associated Organisation')->schema([
Forms\Components\Select::make('organisation_id')
->label('Organisation')
->required()
->options(Organisation::all()->pluck('name', 'id'))
->live(),
]),
Is there anyway I can emit an event to the relationshipmanager and refresh it I did try this
Forms\Components\Section::make('Associated Organisation')->schema([
Forms\Components\Select::make('organisation_id')
->label('Organisation')
->dispatchEvent('refreshExampleRelationManager')
->required()
->options(Organisation::all()->pluck('name', 'id'))
->live(),
]),
Forms\Components\Section::make('Associated Organisation')->schema([
Forms\Components\Select::make('organisation_id')
->label('Organisation')
->dispatchEvent('refreshExampleRelationManager')
->required()
->options(Organisation::all()->pluck('name', 'id'))
->live(),
]),
With Disptach Event and on my relationshipmanager I have this
protected $listeners = ['refreshExampleRelationManager' => '$refresh'];
protected $listeners = ['refreshExampleRelationManager' => '$refresh'];
I think I might be doing this all wrong and might need some guidance, im pretty new to all of this and just trying to go off guides and ect so far... Thanks in advance
2 replies
FFilament
Created by Wazza on 8/9/2023 in #❓┊help
Checkbox list relationship data
Hey everyone this is such a great pacakge by the way its pretty impressive, im just having a little issue with my panel if anyone can give me some help. I created a user panel where you can create, edit and ect like the docs said. I have now wanted to add some logic into a checkboxlist so that a user can be added to teams that belong to an organisation Below is my code Forms\Components\CheckboxList::make('teams') ->options(fn(Forms\Get $get): Collection => $get('organisation_id') ? Team::whereHas('organisations', function ($subquery) use ($get) { $subquery->where('id', $get('organisation_id')); })->pluck('name', 'id') : collect([])) Im cursious to know if there could be a better way then doing this ? Only because im having an issue when I view the user its not showing the teams that they are now assigned to... If you need more details on Model Relationships and ect I can send them if needed 😄 Thanks in advance Wazza
2 replies