toeknee
toeknee
FFilament
Created by toeknee on 11/5/2024 in #❓┊help
Relationship with a relationship after create?
I need to add some relationship data to a relationships relationship. For example: Order -> products -> customisations In a duplicate order function, We have the repeater loading which loads the products relationship, I want to then clone over the customisations relationship. We don't seem to be able to use mutateRelationshipDataBeforeCreating to assign the relationship values.. and theres no record at this state, it's almost like we need an afterCreate function on a repeater relationship?
7 replies
FFilament
Created by toeknee on 10/17/2024 in #❓┊help
Custom Rule - Current record?
How do we access the current record in a custom rule on text input?
4 replies
FFilament
Created by toeknee on 10/3/2024 in #❓┊help
wireclick to chart points
I want to filter the table on a resource by a widgets data point? How can we do that? I was sure I read yesterday something via wireclick but not seeing it today.
3 replies
FFilament
Created by toeknee on 7/12/2024 in #❓┊help
Form to PDF
Has anyone created a form to pdf method before I start? Idea is to allow downloading a PDF of the form's data. i.e. for paper or document management systems.
10 replies
FFilament
Created by toeknee on 6/26/2024 in #❓┊help
New relationmanagers not registering?
I am having a stupid moment, I have added relation manager, it's tab renders but on clicking we get Unable to find component: -relation-manager But it exists, tried clearing cache etc. It'll be something stupid I am sure but it's one of those days
4 replies
FFilament
Created by toeknee on 6/20/2024 in #❓┊help
RelationshipManager Table Ordering
Is there a method I am missing, to allow sorting the table by an order of a relationships relationship? For example, we have a resource showing a list of rows, which then shows data from a relationship, then shows more data from that relationships relationship and I want to order by the order column in the end relaitonship so: Items -> Sub Item -> sub data.order
7 replies
FFilament
Created by toeknee on 6/13/2024 in #❓┊help
list AccessiblePanels?
How can we get a list of the accessiblePanels that this user can access?
4 replies
FFilament
Created by toeknee on 5/16/2024 in #❓┊help
Form Attach action?
We use relation manager, and relationships but how can we have an attach action within a form? We need to allow attaching upto 3 additional records being on indiviudals i.e. part a, b and c form a parts table.... I had hoped for a type of relationship but I am not getting my head around how we can handle it within the need for a relation manager.
2 replies
FFilament
Created by toeknee on 4/24/2024 in #❓┊help
FooterActions not working in modal?
Using
Tables\Actions\ActionGroup::make(actions: [
Tables\Actions\ViewAction::make('view')
->label('View')
->icon('heroicon-o-arrow-top-right-on-square')
->mountUsing(function (ComponentContainer $form, Instance $record) {
return $form->fill($record->submission?->data)->disabled();
})
->extraModalFooterActions([
\Filament\Actions\Action::make('delete')
->requiresConfirmation()
->action(function () {
// ...
}),
Tables\Actions\ActionGroup::make(actions: [
Tables\Actions\ViewAction::make('view')
->label('View')
->icon('heroicon-o-arrow-top-right-on-square')
->mountUsing(function (ComponentContainer $form, Instance $record) {
return $form->fill($record->submission?->data)->disabled();
})
->extraModalFooterActions([
\Filament\Actions\Action::make('delete')
->requiresConfirmation()
->action(function () {
// ...
}),
The modal is never fired for the actions, neither is action hit. The button spins and that's it. Is there a footer action class we should extend that's not in the docs?
2 replies
FFilament
Created by toeknee on 4/15/2024 in #❓┊help
Adding styles to a plugin?
We can include a stylehsheet and that works fine, but how are you building in native filamentphp classes into the plugin? Would you not build them in an expect the standard app build to load in the css and only use the .css for custom classes?
8 replies
FFilament
Created by toeknee on 4/10/2024 in #❓┊help
->money() is rounding?
Using this text column
TextColumn::make('total_pay')
->label('Total Pay')
->alignCenter()
->toggleable()
->money(fn ($record) => $record->currency ?? 'EUR', 0)
->summarize([
Tables\Columns\Summarizers\Sum::make()
->money('EUR', 100)
->label('Total'),
])
->default(0),
TextColumn::make('total_pay')
->label('Total Pay')
->alignCenter()
->toggleable()
->money(fn ($record) => $record->currency ?? 'EUR', 0)
->summarize([
Tables\Columns\Summarizers\Sum::make()
->money('EUR', 100)
->label('Total'),
])
->default(0),
is not keeping two decimal places. How do we ensure it is formatted two 2 decimals / relative to the currency? The state is correct i.e. 160.02, but the displayed money value is £160
4 replies
FFilament
Created by toeknee on 3/26/2024 in #❓┊help
Tables in Actions
Anyone know the usage of: Tables\Actions\Action::make('my_action')->table() think it could reduce my file usage if I don't need a blade to render a table in an action ?
2 replies
FFilament
Created by toeknee on 2/29/2024 in #❓┊help
Table view to PDF?
Has anyone implemented a export table view to PDF?
11 replies
FFilament
Created by toeknee on 2/29/2024 in #❓┊help
Prevent Modal Closing?
Within the tables component in a livewire component we have an action, that action renders a form with a view field. The view field renders a button with:
<button wire:click="downloadAttachment('{{ $invoice_id }}','{{ $file_name }}')">
<x-heroicon-o-document-arrow-down class="w-4 h-4 text-white-500 inline" /> Download
</button>
<button wire:click="downloadAttachment('{{ $invoice_id }}','{{ $file_name }}')">
<x-heroicon-o-document-arrow-down class="w-4 h-4 text-white-500 inline" /> Download
</button>
This works well, but on downloading the document the modal / sliderOver is closed. Is there a method we can place in the downloadAttachment function to prevent the modal/slideOver closing?
5 replies
FFilament
Created by toeknee on 2/5/2024 in #❓┊help
Notifications - Markdown
In V2 it was documented notifications automatically parses markdown, but v3 doesn't mention this. How can we ensure parsing works in v3 notifications as it doesn't seem to now.
2 replies
FFilament
Created by toeknee on 2/1/2024 in #❓┊help
SpatieMediaLibrary not uploading files Livewire Component?
Using The interacts with media on the model, and then in the form component we have the standard type of save:
public function save(): void
{
// Validate the form accordingly
$this->form->validate();

$stateData = $this->form->getState();

}
public function save(): void
{
// Validate the form accordingly
$this->form->validate();

$stateData = $this->form->getState();

}
Looking at the network requests we are having files uploaded to upload-file?expires=3423232342332 any suggestions? Using S3 no errors, not logs. Just no files saved, used to work in V2.
15 replies
FFilament
Created by toeknee on 1/30/2024 in #❓┊help
Colors and Froms/Tables in livewire component?
When using the livewire component how do we define what colors are used for the forms and tables component? Noting, this is outside Panels.
8 replies
FFilament
Created by toeknee on 1/26/2024 in #❓┊help
Bug? Actions show disabled when set to hidden
Using actions on a LW Component, we have for example:
eturn Action::make('loadDraft')
->visible(fn () => MyModel::where('id', '=', $this->id)
->where('is_draft', '=', true)
->where('user_id', '=', auth()->user()?->id)->count() >= 1)
->label('Load a Draft')
->modalWidth('md')
->form([
Select::make('id')
->hiddenLabel()
->options(
MyModel::where('id', '=', $this->instance_id)
->where('is_draft', '=', true)
->where('user_id', '=', auth()->user()?->id)
->orderBy('created_at', 'desc')
->pluck('created_at', 'id')
->map(function ($item, $key) {
return $item->format('d M Y - H:i:s');
})

),
])
->action(function ($data) {
dd($date);
});
eturn Action::make('loadDraft')
->visible(fn () => MyModel::where('id', '=', $this->id)
->where('is_draft', '=', true)
->where('user_id', '=', auth()->user()?->id)->count() >= 1)
->label('Load a Draft')
->modalWidth('md')
->form([
Select::make('id')
->hiddenLabel()
->options(
MyModel::where('id', '=', $this->instance_id)
->where('is_draft', '=', true)
->where('user_id', '=', auth()->user()?->id)
->orderBy('created_at', 'desc')
->pluck('created_at', 'id')
->map(function ($item, $key) {
return $item->format('d M Y - H:i:s');
})

),
])
->action(function ($data) {
dd($date);
});
The action button shows greys out, disabled should only do that, now visible/disabled
9 replies
FFilament
Created by toeknee on 1/26/2024 in #❓┊help
Action not trigging in a livewire component?
Simple action:
public function saveAndResumeAction(): Action
{
return Action::make('save_resume')
->label('Save and Resume Later')
->form([
TextInput::make('test')->label('Test'),
])
->action(fn () => dd('hit')
);
}
public function saveAndResumeAction(): Action
{
return Action::make('save_resume')
->label('Save and Resume Later')
->form([
TextInput::make('test')->label('Test'),
])
->action(fn () => dd('hit')
);
}
called with this in the view:
{{ $this->saveAndResumeAction }}
<x-filament-actions::modals />
{{ $this->saveAndResumeAction }}
<x-filament-actions::modals />
Just spins and doesn't do anything and action is never hit... suggestions? if I write a function
public function save_resume()
{
dd('hit me');
}
public function save_resume()
{
dd('hit me');
}
then save_resume function is hit...
19 replies
FFilament
Created by toeknee on 1/24/2024 in #❓┊help
Export Actions - Fail, how do we find out why?
In the export action, I am getting 17/17 failures . so no rows export, this isn't really making sense to me as to why so I need to find out why, but theres no logs etc. How can we delive into figuring out what has happened?
3 replies