Jean Roumeau
Jean Roumeau
FFilament
Created by Jean Roumeau on 7/5/2024 in #❓┊help
Custom logic after import completed
Hello. Is it possible to run custom logic after a import has completed?. I need to import a CSV file with X records and I need to run a new Job after all the records have been imported. The lifecycle hooks seems to be for each imported record but I need to run the logic once all the records have been processed. Thanks.
4 replies
FFilament
Created by Jean Roumeau on 5/3/2024 in #❓┊help
Validate import before inserting records.
Hello. I'm playing around with import actions to see if it suits my needs. Do yo know if its possible to validate the CSV before inserting data in the database?. I need to be able to cancel de import if data is invalid. I read on docs that the import process collects all failed rows but does that mean that valid data get imported? This is a problem to me as partial import is hard to handle and will prefer to avoid import at all if data fails validation. In order to fix it and attempt the import again. Thanks.
6 replies
FFilament
Created by Jean Roumeau on 4/26/2024 in #❓┊help
Nested categories
Hello. I need to create a category tree with infinite nesting. Is anyone using a plugin for this or can point me in the right direction on how to achieve this?
5 replies
FFilament
Created by Jean Roumeau on 12/26/2023 in #❓┊help
Authorization on Repeater Form field relation
Is possible to add authorization to form fields. I know I can add a hide() and pass a closure that calls for user->can() But does filament use authorization on a repeater (relation) form field as it does on a relation manager?
1 replies
FFilament
Created by Jean Roumeau on 12/14/2023 in #❓┊help
Record data not updated after changes on a Livewire component within a Infolist
Hello. I'm building custom InfoList for a Document record. The document is shared throuh a form where the user can add emails and send the link. This behavior is already working in a livewire component that is being added in the infolist. Then below the form i have an Action component that allows me to disable the shared link. This action is not loaded until the document is shared and the shared link is available for the document (After submitting the form). The problem is that when I submit the form and the link is generated, the Action below is not being disaplayed until I refresh the page. This should be reactive on the infolist (i guess) but I dont know how to trigger the reactivity on the Action entry in order to display the button without reloading the whole page. Any help is appreciated.
21 replies
FFilament
Created by Jean Roumeau on 12/11/2023 in #❓┊help
Pagination on View Record
Hello. Has anyone added pagination to View Record page, like "Prev | Next" on the view record?. I need to be able to search on the List view of a resource, and after I open one of the results I want to be able to move to the previous or next result from the View Record (Infolist) . I guess I would need to pass the filters to the view page in order to be able to build the pagination there. Has anyone attempted this or is it possible? Thanks.
5 replies
FFilament
Created by Jean Roumeau on 12/3/2023 in #❓┊help
Is it possible to display a resource create form within a table header Bulk action.
I need to associate multiple resources with another new resource. For this I have a bulk action in a table that opens up a modal and I can add a form in that action. But I don't know if there is a way to instead of adding the form on the action I can add an already existing create resource form. I could load the resource form with CreatePage::form(). But that doesn't seem to keep the original resource on the form and instead uses the resource from the table.
9 replies
FFilament
Created by Jean Roumeau on 11/8/2023 in #❓┊help
Repeater reordering not working on relationship
Hello. I have a repeater on a form using a relationship. I already added the order column, but the sortable arrows are not displaying. Is this a removed feature, a bug or am I missing something?. According to the docs. this should work but its not working on my end. A workaround would be to add the DocumentTypeFields with a relation manager, but I think it should work with the repeater. Here is the sample code
public static function form(Form $form): Form
{
return $form
->columns(1)
->schema([
Forms\Components\Section::make()
->inlineLabel()
->columns(1)
->schema([
Forms\Components\TextInput::make('name')
->required(),
]),

Forms\Components\Section::make(__('Fields'))
->schema([
Forms\Components\Repeater::make('fields')
->itemLabel(fn (array $state): ?string => $state['name'] ?? __('Field'))
->label(false)
->collapsible()
->orderColumn('order')
->relationship()
->reorderableWithDragAndDrop(false)
->reorderableWithButtons(true)
->grid(1)
->columns(4)
->minItems(1)
->schema([
Forms\Components\TextInput::make('name')
->live(onBlur: true)
->required(),

Forms\Components\Select::make('type')
->options(fn () => FieldTypes::getArrayWithPrefix())
->required()
->reactive(),
])
])
]);
}
public static function form(Form $form): Form
{
return $form
->columns(1)
->schema([
Forms\Components\Section::make()
->inlineLabel()
->columns(1)
->schema([
Forms\Components\TextInput::make('name')
->required(),
]),

Forms\Components\Section::make(__('Fields'))
->schema([
Forms\Components\Repeater::make('fields')
->itemLabel(fn (array $state): ?string => $state['name'] ?? __('Field'))
->label(false)
->collapsible()
->orderColumn('order')
->relationship()
->reorderableWithDragAndDrop(false)
->reorderableWithButtons(true)
->grid(1)
->columns(4)
->minItems(1)
->schema([
Forms\Components\TextInput::make('name')
->live(onBlur: true)
->required(),

Forms\Components\Select::make('type')
->options(fn () => FieldTypes::getArrayWithPrefix())
->required()
->reactive(),
])
])
]);
}
Thanks
3 replies
FFilament
Created by Jean Roumeau on 10/20/2023 in #❓┊help
Adding BelongsToMany that includes another BelongsToMany relation to a form
Hello. I need to create a form for users creation that allows to assign clients to the user but also select Business Areas from that Client to the user. I'm a bit confused on how to implement this or if its possible with Filament Forms.
16 replies
FFilament
Created by Jean Roumeau on 10/5/2023 in #❓┊help
Custom query table
How can I create a custom Table using a custom query (loading records through a stored procedure). I need to add this table to a page. I tried to add the query to the table but the method needs an Eloquent query builder instead of a plain query builder. Is this possible, is anyone doing this?
6 replies
FFilament
Created by Jean Roumeau on 9/22/2023 in #❓┊help
Column summarize does not set the correct database connection
I'm trying to summarize a table where I have 2 active database connections (Mysql and MysqlServer). The table points to a Sql Server table but when summarizing the results it clones the table query with the default database connection instead of the original connectio from the model. Therefore as 'mysql' is the default connection, the query fails as it executes on MySQL instead of SqlServer.
1 replies
FFilament
Created by Jean Roumeau on 9/16/2023 in #❓┊help
Resource main filter
I have an application where certain resources are attached to one client specifically. I need those resources to select the client prior to list/create/update. What would be the best approach for this, any suggestion please?
2 replies
FFilament
Created by Jean Roumeau on 8/22/2023 in #❓┊help
Is it possible to force a select filter before displaying table records?
I want the user to select a client model before displaying its documents on a DocumentsResource. Is it possible to force the select before displaying the records?
5 replies
FFilament
Created by Jean Roumeau on 6/8/2023 in #❓┊help
Force password reset on first login
Hello. I need to be able to create users through admin panel and force password reset on the user first login. I've already implemented email verification so I would need to request the password reset directly after verifying the email. What would be the best way to force password reset? I'm not sure if I should add a flag on the DB for the user table perhaps. Any help and comment is appreciated. Thanks.
12 replies
FFilament
Created by Jean Roumeau on 5/1/2023 in #❓┊help
How to add a required filter before listing items
I have a page where I need to display a list of items based on a previous required select filter. IE: Having a list of books, I need to select a book category before displaying the books list in order to show only the selected category books. Is this possible. I'm adding the filter to the table but the query is not filtering the default selection and this also gives error when I remove the filter indicator on the table.
2 replies