d3v1anX
d3v1anX
FFilament
Created by d3v1anX on 8/20/2024 in #❓┊help
how to open edit modal from link?
I solved it by myself:
<div @if(request()->has('id')) x-data="{}"
x-init="$wire.$dispatch('openModal', [{{ request()->id }}])"
@endif
>
<div @if(request()->has('id')) x-data="{}"
x-init="$wire.$dispatch('openModal', [{{ request()->id }}])"
@endif
>
and
#[On('openModal')]
public function openModal($entry)
{
$this->mountTableAction('edit', $entry);
}
#[On('openModal')]
public function openModal($entry)
{
$this->mountTableAction('edit', $entry);
}
Maybe there is a better solution, but it works 😄
4 replies
FFilament
Created by d3v1anX on 8/9/2024 in #❓┊help
Open modal after page load
got it 🙂 instead of
->url(InvitationResource::getUrl('index', ['create' => true]))
->url(InvitationResource::getUrl('index', ['create' => true]))
just
->url(InvitationResource::getUrl('index', ['action' => 'create']))
->url(InvitationResource::getUrl('index', ['action' => 'create']))
4 replies
FFilament
Created by d3v1anX on 8/8/2024 in #❓┊help
Standard Create Action in modal
I am stupid 😄 I didn't had a look into the ListInvitation-class. All the time I looked into the Create class - thank you for pointing me to the right direction 🙂
8 replies
FFilament
Created by d3v1anX on 8/8/2024 in #❓┊help
Standard Create Action in modal
yes, that’s correct 👍 but I want to add an extra field to the model after validation before saving 🙂
8 replies
FFilament
Created by d3v1anX on 5/2/2024 in #❓┊help
Saving relationships on livewire Action
but unfortunately I only get the array without the relationship-data:
array:6 [
"name" => "dsadsadsdas"
"status" => "1"
"content" => "<p>asddsdsaads</p>"
"sort" => 6
]
array:6 [
"name" => "dsadsadsdas"
"status" => "1"
"content" => "<p>asddsdsaads</p>"
"sort" => 6
]
9 replies
FFilament
Created by d3v1anX on 5/2/2024 in #❓┊help
Saving relationships on livewire Action
Ah, yeah - sorry for misunderstanding - I missed here in the example, that I want do pass the data through a manual saving process ->
->action(fn(CreatePage $creator, array $data) => $this->create($creator, $data))
->action(fn(CreatePage $creator, array $data) => $this->create($creator, $data))
And there I need the relationship in $data 🙂
9 replies
FFilament
Created by d3v1anX on 5/2/2024 in #❓┊help
Saving relationships on livewire Action
Hey @Dennis Koch, thank you for answering - unfortunately the relationships are not saved automatically on livewire components - at least on my end. All other stuff is saved correctly - but not the relationship. Just for completation: My Page model has relation belongsToMany:
public function teams(): BelongsToMany
{
return $this->belongsToMany(Team::class);
}
public function teams(): BelongsToMany
{
return $this->belongsToMany(Team::class);
}
and the Team model has also a belongsToMany relation:
public function pages(): BelongsToMany
{
return $this->belongsToMany(Page::class);
}
public function pages(): BelongsToMany
{
return $this->belongsToMany(Page::class);
}
9 replies
FFilament
Created by d3v1anX on 2/20/2024 in #❓┊help
createOptionUsing on select not called in livewire component
thanks for your trying to help @Leandro Ferreira 🙂
9 replies
FFilament
Created by d3v1anX on 2/20/2024 in #❓┊help
createOptionUsing on select not called in livewire component
found the problem: ->relationship has much functions inside - including createOptionUsing, which overwrites my own function. placing "->relationship" on top of "->createOptionUsing" works.. 😄
9 replies
FFilament
Created by d3v1anX on 2/20/2024 in #❓┊help
createOptionUsing on select not called in livewire component
yes, it opens
9 replies
FFilament
Created by Gabriel Sieben on 10/10/2023 in #❓┊help
wire:navigate on an Action
Good morning guys - I have the same problem: Added a table to an livewire component, want to
TextColumn::make('currentPrice.price')->label('Price')->searchable()->sortable()
->url(fn($record) => route('prices.index', ['product' => $record->id]))->extraAttributes(['wire:navigate' => 'true'])
TextColumn::make('currentPrice.price')->label('Price')->searchable()->sortable()
->url(fn($record) => route('prices.index', ['product' => $record->id]))->extraAttributes(['wire:navigate' => 'true'])
but the extraAttribute will placed to the div like so:
<a href="https://erp.test/prices/9" class="flex w-full disabled:pointer-events-none justify-start text-start">
<div class="fi-ta-text grid w-full gap-y-1 px-3 py-4" wire:navigate="true">
<a href="https://erp.test/prices/9" class="flex w-full disabled:pointer-events-none justify-start text-start">
<div class="fi-ta-text grid w-full gap-y-1 px-3 py-4" wire:navigate="true">
are there any possibilities to add the wire:navigate directly to the a tag?
11 replies
FFilament
Created by d3v1anX on 10/27/2023 in #❓┊help
Default sort direction based on defaultgroup in table builder
Hey toeknee, thank you for the quick response. I tried, but unfortunately it won’t order the group like the dropdown does 🙂 this only sorts the entries within the groups :/
5 replies
FFilament
Created by d3v1anX on 10/13/2023 in #❓┊help
Bug? Custom summarize with groups
6 replies
FFilament
Created by d3v1anX on 10/13/2023 in #❓┊help
Bug? Custom summarize with groups
Sure, thank you Dan 😊
6 replies
FFilament
Created by d3v1anX on 10/13/2023 in #❓┊help
Bug? Custom summarize with groups
No description
6 replies
FFilament
Created by d3v1anX on 10/10/2023 in #❓┊help
Widget Live form
Oh my god - did the same mistake as in https://discord.com/channels/883083792112300104/1161190672708153465 The test variable must be set as public - only then the "afterStateUpdated" function will be called.
5 replies
FFilament
Created by d3v1anX on 8/22/2023 in #❓┊help
dynamic navigation item in panel
thank you very much @Patrick Boivin 👌
12 replies
FFilament
Created by d3v1anX on 8/22/2023 in #❓┊help
dynamic navigation item in panel
found a workaround to hide the group as well, if the user cannot access the panel:
public function panel(Panel $panel): Panel
{
return $panel
// ...
->navigationItems([
NavigationItem::make(fn () => __('Login as admin'))
->url('/admin')
->icon('heroicon-o-arrow-right-on-rectangle')
->visible(fn () => $this->canAccessAdminPanel())
->sort(2)
->group(fn () => $this->canAccessAdminPanel() ? __('Administration') : ''),
]);
}

private function canAccessAdminPanel()
{
return auth()->user()->canAccessPanel(Filament::getPanel('admin'));
}
public function panel(Panel $panel): Panel
{
return $panel
// ...
->navigationItems([
NavigationItem::make(fn () => __('Login as admin'))
->url('/admin')
->icon('heroicon-o-arrow-right-on-rectangle')
->visible(fn () => $this->canAccessAdminPanel())
->sort(2)
->group(fn () => $this->canAccessAdminPanel() ? __('Administration') : ''),
]);
}

private function canAccessAdminPanel()
{
return auth()->user()->canAccessPanel(Filament::getPanel('admin'));
}
This is working right now and I think I can live with that 🙂
12 replies
FFilament
Created by d3v1anX on 8/22/2023 in #❓┊help
dynamic navigation item in panel
unfortunately now auth()->user is null 😄 https://flareapp.io/share/VP6MO6Rm
12 replies
FFilament
Created by d3v1anX on 8/22/2023 in #❓┊help
dynamic navigation item in panel
12 replies