Arnaud
Arnaud
Explore posts from servers
FFilament
Created by tuto1902 on 1/24/2024 in #❓┊help
Conditionally change the background of a repeatable entry item
Maybe you can add custom class base on content. And play with css ?
5 replies
FFilament
Created by Arnaud on 1/19/2024 in #❓┊help
Sidebar toggle fail
Yes, it's automatic with my composer config, but I retried, then npm i / build. I really don't know :/ Because it was urgent, I added a little bit of css to cover that point. Thanks anyway guys
.fi-sidebar:not(.fi-sidebar-open) {
@apply w-24;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-dropdown {
@apply shrink-0 h-12 w-12;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-tenant-menu-ctn {
@apply !mx-auto;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-group {
@apply px-4 py-6;
}
.fi-sidebar:not(.fi-sidebar-open) {
@apply w-24;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-dropdown {
@apply shrink-0 h-12 w-12;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-tenant-menu-ctn {
@apply !mx-auto;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-group {
@apply px-4 py-6;
}
7 replies
FFilament
Created by Arnaud on 1/19/2024 in #❓┊help
Sidebar toggle fail
Hello Tieme, thanks. Sorry I tried that, clear cache, browser cache, try new browser. All the "regular" stuff 😅
7 replies
FFilament
Created by hxnnxs on 1/18/2024 in #❓┊help
auto selecting company_id
like $data['company_id'] = Filament::getTenant()->id
10 replies
FFilament
Created by hxnnxs on 1/18/2024 in #❓┊help
auto selecting company_id
If it's always the current company, you can remove this field and mutate before save/create to add company id
10 replies
FFilament
Created by hxnnxs on 1/18/2024 in #❓┊help
auto selecting company_id
To get the current company, you can do Filament::getTenant(), if company is your tenant of course
10 replies
FFilament
Created by hxnnxs on 1/18/2024 in #❓┊help
auto selecting company_id
Hello
10 replies
FFilament
Created by Diogo Pinto on 8/31/2023 in #❓┊help
User Set Password after registering User in the panel
Hello, finally it wasn't working as expected .. so I ended it up by overwrite the auth pages
15 replies
FFilament
Created by Arnaud on 12/31/2023 in #❓┊help
Strange behavior with sort in views
8 replies
FFilament
Created by Arnaud on 12/31/2023 in #❓┊help
Strange behavior with sort in views
@Dennis Koch Thanks, I'm really disappointed as it was very very very basic ... 😖 wire:key missing argument...
8 replies
FFilament
Created by Arnaud on 12/31/2023 in #❓┊help
Strange behavior with sort in views
Somebody has idea 🤩 ?
8 replies
FFilament
Created by Arnaud on 12/31/2023 in #❓┊help
Strange behavior with sort in views
I ridiculously manage it by saved ids in an array and loop over the array ... I'm sure there is a better way.
8 replies
FFilament
Created by Arnaud on 12/19/2023 in #❓┊help
Enormous class size
Thank you, I ended up to similar approach 🙂
5 replies
FFilament
Created by Arnaud on 12/22/2023 in #❓┊help
Use Notification for error 500 in production
Hello Dennis, in production I have APP_DEBUG=false, however I still have this big gray screen. So if somebody is interested, I found a solution. In resources/js/app.js Insert the following code :
document.addEventListener('livewire:init', () => {
Livewire.hook('request', ({ fail }) => {
fail(({ status, preventDefault }) => {
if (status === 500 && !import.meta.env.VITE_APP_DEBUG) {
new FilamentNotification()
.title('Error')
.danger()
.body('Support team received an error notification. We will contact you as soon as possible.')
.send()

preventDefault()
}
})
})
})
document.addEventListener('livewire:init', () => {
Livewire.hook('request', ({ fail }) => {
fail(({ status, preventDefault }) => {
if (status === 500 && !import.meta.env.VITE_APP_DEBUG) {
new FilamentNotification()
.title('Error')
.danger()
.body('Support team received an error notification. We will contact you as soon as possible.')
.send()

preventDefault()
}
})
})
})
And in .env :
VITE_APP_DEBUG=true
VITE_APP_DEBUG=true
With vite app debug, you can still display regular message in your dev env but use the notification in your prod env. You can customize every error message. For my case it's nice, so I receive on Flare the error but user is not bother.
6 replies
FFilament
Created by Hai NGUYEN on 8/12/2023 in #❓┊help
cannot show icon
Hello, if it could helps, juste use default : ->default(false). In my case :

IconColumn::make('calendar_id')
->label('With meeting ?')
->boolean()
->icon('heroicon-o-calendar')
->default(false)
->falseColor('gray'),

IconColumn::make('calendar_id')
->label('With meeting ?')
->boolean()
->icon('heroicon-o-calendar')
->default(false)
->falseColor('gray'),
Also works with column relationship exists 🙂
16 replies
FFilament
Created by Arnaud on 11/29/2023 in #❓┊help
Hide form loose state
Works well, no more errors ❤️ Have a nice day
5 replies
FFilament
Created by Arnaud on 11/29/2023 in #❓┊help
Hide form loose state
Thank you for your feedback. I will try to simply hide it with css.
5 replies
FFilament
Created by mklinux on 8/24/2023 in #❓┊help
Filament 3 multi tenancy with domain implement
Hello, did you achieve it ?
8 replies
FFilament
Created by Arnaud on 11/5/2023 in #❓┊help
Tenant admin color
Ok so if anybody wonder how to do that, I've simply created a new middleware :
public function handle(Request $request, Closure $next): Response
{
$tenant = Filament::getTenant();

if (! $tenant) {
return $next($request);
}

FilamentColor::register([
'primary' => $this->returnColor($tenant->color),
]);

return $next($request);
}

public function returnColor(string $color = 'Sky'): array
{
return constant('Filament\\Support\\Colors\\Color::'.$color);
}
public function handle(Request $request, Closure $next): Response
{
$tenant = Filament::getTenant();

if (! $tenant) {
return $next($request);
}

FilamentColor::register([
'primary' => $this->returnColor($tenant->color),
]);

return $next($request);
}

public function returnColor(string $color = 'Sky'): array
{
return constant('Filament\\Support\\Colors\\Color::'.$color);
}
And add it to ->tenantMiddleware in $panel configuration
7 replies
FFilament
Created by Arnaud on 11/2/2023 in #❓┊help
Filter by pivot
Up
2 replies