johny7
johny7
FFilament
Created by johny7 on 10/14/2024 in #❓┊help
Auto-Closing extraModalFooterAction is buggy
Hi everyone. I have defined headerActions on an EditRecord page that should call a modal form. In the footer there are not the standard actions, but a kind of paging function and separate actions for saving and closing. For this I use the function extraModalFooterActions(). For closing, I create the following action in extraModalFooterActions():
// ...
$actions[] = $action->makeModalAction('cancel')
->icon('heroicon-m-no-symbol')
->label('')
->color('gray')
->close();
// ...
return $actions;
// ...
// ...
$actions[] = $action->makeModalAction('cancel')
->icon('heroicon-m-no-symbol')
->label('')
->color('gray')
->close();
// ...
return $actions;
// ...
To process the form and save it in the database, ->action() with makeModelAction() apparently has no effect. So I create the action as follows:
// ...
$actions[] = Action::make('operate')
->label('Operate')
->action(fn(array $data) => callMyOperationFunction($data));
// ...
// ...
$actions[] = Action::make('operate')
->label('Operate')
->action(fn(array $data) => callMyOperationFunction($data));
// ...
This works well so far. Now I want the data to be processed after clicking on the “Operate” button and the modal to be closed. So far I have always achieved this as follows:
// ...
$actions[] = Action::make('operate')
->label('Operate')
->action(fn(array $data) => callMyOperationFunction($data))
->close();
// ...
// ...
$actions[] = Action::make('operate')
->label('Operate')
->action(fn(array $data) => callMyOperationFunction($data))
->close();
// ...
This has not been working properly for some time now. As soon as I click on the button, the data is processed and the modal is closed. But after a few seconds the black, semi-transparent area appears again over the whole screen (as with the modal window), and my GUI is not operable. Unfortunately, I can't say exactly when this problem started. Can anyone help me? Many thanks in advance! JN
3 replies
FFilament
Created by johny7 on 9/27/2024 in #❓┊help
Filament favicon is not embedded via https
Hello everyone. I use the directive ->favicon(asset('/images/favicon.png')) in my panel. When I call my panel in the local environment, the favicon is provided and included as expected. On my prod server (on fly.io), however, the favicon is strangely included via Http, although the entire app is provided via HTTPS. All other assets (CSS, JS, laravel and filament) are included relative or via absolute path with HTTPS. What is the reason for this and how can I change it? My browser understandably does not want to display a favicon integrated via a different protocol. I have already tested re-build and filament upgrade. If I call asset('/images/favicon.png') once on my fly.io instance via SSH in artisan tinker, I also get the path including HTTPS. If I see it correctly, the behavior occurred after the introduction of multi-tenancy. As a result, I had to reconfigure some routes. Could it be somehow related to this? And how can I debug or fix this correctly? My routing configuration currently looks like this:
Route::get('{tenant}/image/{model}/{field}/{id}', [App\Http\Controllers\ImageController::class, 'show'])->name('image');
Route::redirect('{tenant}/aktuelle-probe', '/{tenant}/proben/' . (App\Models\Probe::current()?->id));
Route::get('{tenant}/image/{model}/{field}/{id}', [App\Http\Controllers\ImageController::class, 'show'])->name('image');
Route::redirect('{tenant}/aktuelle-probe', '/{tenant}/proben/' . (App\Models\Probe::current()?->id));
Many thanks in advance for your help! Johannes Nazarov
8 replies
FFilament
Created by johny7 on 10/19/2023 in #❓┊help
GMail Mailer for laravel/filament
Moin together, I have now searched the web for various keywords, but can't find a solution for sending mail in laravel/filament with GMail. There is a solution for workspace organizations (https://github.com/synio-wesley/laravel-gmail-service-account-mail-driver), but none for sending mails with my private email address from GoogleMail. Old instructions refer to smtp with ssl or tls, but that is deactivated by Google since may 2022. It can't be that I'm the first one who needs this. How do you handle this?
4 replies
FFilament
Created by johny7 on 10/10/2023 in #❓┊help
How to call the second action after submitting the first action-form?
Moin together. I have on an edit page of a resource 4 header-actions with modal forms. I want to offer the possibility to jump directly to the modal form of the next header-action after submitting one of these forms. The wizard steps are not enough for me, because I don't see (at least not yet) a possibility to save the data already when changing the step. I can call ->extraModalFooterActions() for example ->makeModalSubmitAction() to save the form. But how do I get it to call the next modal directly afterwards without defining the whole form as sub-modal again? Finally, I have defined the 4 header-actions with their forms on the page. I have tried ->extraAttributes(['wire:target' => '']) and various functions, so far without success. Thanks in advance for the suggestions.
8 replies
FFilament
Created by johny7 on 9/29/2023 in #❓┊help
Use filament custom theme without npm/node
Hello everyone, is it possible, to use a custom theme in filament without npm? My webspace provider don't provide node. So I can use purely php. But when creating and registering a new custom template, this template works only during running npm run dev. So, when it's possible, what I have to do? I don't find anything about this in the docs neither via google search. Thanks in advance
14 replies