Jon Mason
Jon Mason
FFilament
Created by Jon Mason on 6/10/2024 in #❓┊help
searchable select in infolist?
maybe I just need a livewire component in a loop for each record...might be overthinking this.
3 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
No description
16 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
Yeah, it's only users who have access to a single panel (client). All the other users are not having any issue.
16 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
this would be so much easier if I could reproduce it locally, but it's all working right there. So frustrating. Maybe it is rate limiting? I guess I need to add more logging into the internals of Filament to see what's happening? I'm at a loss.
16 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
I copied the Filament\Http\Middleware\Authenticate class into my own middleware directory and imported that class instead so I could add some logging. It appears that the Authenticate class is never getting called. It's not getting there before the error is kicked back. How can it not even be getting to the authentication?
16 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
I added some logging and it's not even getting to the canAccessPanel method before kicking back the error.
16 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
And this is my canAccessPanel method, which I'm not sure is relevant:
public function canAccessPanel(Panel $panel): bool
{
if ($panel->getId() == 'client') {
return $this->hasVerifiedEmail();
} else if ($panel->getId() == 'admin') {
return $this->role->is_internal && $this->hasVerifiedEmail() && $this->hasAdminRole();
} else if ($panel->getId() == 'app') {
return $this->role->is_internal && $this->hasVerifiedEmail();
} else {
return true;
}
}
public function canAccessPanel(Panel $panel): bool
{
if ($panel->getId() == 'client') {
return $this->hasVerifiedEmail();
} else if ($panel->getId() == 'admin') {
return $this->role->is_internal && $this->hasVerifiedEmail() && $this->hasAdminRole();
} else if ($panel->getId() == 'app') {
return $this->role->is_internal && $this->hasVerifiedEmail();
} else {
return true;
}
}
16 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
I do have the MustVerifyEmail trait on my User model.
16 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
Currently reviewing this issue. If anyone has run into this and can clue me in on what the problem might be, I'd greatly appreciate it. https://github.com/filamentphp/filament/discussions/11506
16 replies
FFilament
Created by Jon Mason on 5/10/2024 in #❓┊help
Production issue affecting multiple users. Need some help with where to start.
Here's my ClientPanelProvider:
class ClientPanelProvider extends PanelProvider
{
public function boot()
{
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
$panelSwitch->simple()
->excludes(fn () => auth()->user()?->excludedPanels())
->visible(fn (): bool => auth()->user()?->isInternal());
});
}

public function panel(Panel $panel): Panel
{
return $panel
->id('client')
->path('client')
->login()
->passwordReset()
->viteTheme('resources/css/filament/app/theme.css')
->discoverResources(in: app_path('Filament/Client/Resources'), for: 'App\\Filament\\Client\\Resources')
->discoverPages(in: app_path('Filament/Client/Pages'), for: 'App\\Filament\\Client\\Pages')
->pages([
\App\Livewire\Client\ClientDashboard::class,
Recat::class,
PartsRolloverList::class,
PartsRolloverDetail::class,
])
->discoverWidgets(in: app_path('Filament/Client/Widgets'), for: 'App\\Filament\\Client\\Widgets')
->plugins([
FilamentApexChartsPlugin::make(),
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class
])
->authMiddleware([
Authenticate::class,
RedirectToIntendedMiddleware::class,
])
}
}
class ClientPanelProvider extends PanelProvider
{
public function boot()
{
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
$panelSwitch->simple()
->excludes(fn () => auth()->user()?->excludedPanels())
->visible(fn (): bool => auth()->user()?->isInternal());
});
}

public function panel(Panel $panel): Panel
{
return $panel
->id('client')
->path('client')
->login()
->passwordReset()
->viteTheme('resources/css/filament/app/theme.css')
->discoverResources(in: app_path('Filament/Client/Resources'), for: 'App\\Filament\\Client\\Resources')
->discoverPages(in: app_path('Filament/Client/Pages'), for: 'App\\Filament\\Client\\Pages')
->pages([
\App\Livewire\Client\ClientDashboard::class,
Recat::class,
PartsRolloverList::class,
PartsRolloverDetail::class,
])
->discoverWidgets(in: app_path('Filament/Client/Widgets'), for: 'App\\Filament\\Client\\Widgets')
->plugins([
FilamentApexChartsPlugin::make(),
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class
])
->authMiddleware([
Authenticate::class,
RedirectToIntendedMiddleware::class,
])
}
}
16 replies
FFilament
Created by Jon Mason on 12/2/2023 in #❓┊help
Livewire component with custom, dynamic form, struggling with select default values
I've also tried ->afterStateHydrated(fn (Select $component) => $component->state(array_search($defaults['transaction_date'], $options)))
7 replies
FFilament
Created by Jon Mason on 12/2/2023 in #❓┊help
Livewire component with custom, dynamic form, struggling with select default values
Still struggling with this, hoping maybe someone has some ideas. This is the current iteration of the offending code. I just can't seem to set a default value for the select:
Select::make($mapping['id'] . '-transaction_date')
->label('Transaction Date')
->formatStateUsing(fn () => array_search($defaults['transaction_date'], $outputArr))
// ->afterStateUpdated(fn (Select $component) => $component->state(array_search($defaults['transaction_date'], $outputArr)))
->live()
->options($options)
->required(),
Select::make($mapping['id'] . '-transaction_date')
->label('Transaction Date')
->formatStateUsing(fn () => array_search($defaults['transaction_date'], $outputArr))
// ->afterStateUpdated(fn (Select $component) => $component->state(array_search($defaults['transaction_date'], $outputArr)))
->live()
->options($options)
->required(),
7 replies
FFilament
Created by Jon Mason on 5/4/2024 in #❓┊help
TextEntry with static url, how to set text of anchor tag?
that did it, thank you..
6 replies
FFilament
Created by Jon Mason on 5/4/2024 in #❓┊help
TextEntry with static url, how to set text of anchor tag?
I tried doing this as an alternative:
->html(function (Model $reference) {
$id = $reference->id;
return new HtmlString('<a href="https://somedomain.com/somepath?someid={$id}">View my stupid link</a>'; })
->html(function (Model $reference) {
$id = $reference->id;
return new HtmlString('<a href="https://somedomain.com/somepath?someid={$id}">View my stupid link</a>'; })
and using that method, the a tag isn't even in the rendered dom.
6 replies
FFilament
Created by Sawal on 4/5/2024 in #❓┊help
current url, /livewire/update
That's because livewire is making ajax calls behind the scenes, so initial pagel oad will be your expected url, and then subsequent calls will be livewire/update. You could set the url value in your mount method and then reference it in your action, perhaps.
14 replies
FFilament
Created by Jon Mason on 5/2/2024 in #❓┊help
is it possible to add dividers in a grouped action blade / livewire component?
Thanks I'll check it out!
4 replies
FFilament
Created by Jon Mason on 4/16/2024 in #❓┊help
open modal on page load
this worked for me, thanks!
10 replies
FFilament
Created by Jon Mason on 5/2/2024 in #❓┊help
FileUpload failed to upload.
ugh, the server settings were the problem.
7 replies
FFilament
Created by Jon Mason on 5/2/2024 in #❓┊help
FileUpload failed to upload.
This is in production now...if anyone has run into this and has any input I'd greatly appreciate it.
7 replies
FFilament
Created by Jon Mason on 5/2/2024 in #❓┊help
FileUpload failed to upload.
ok this is super frustrating. I can upload the file locally, but once deployed it won't upload the same file. I've gone so far as to take out the entire file size limit entirely and I'm still getting the 413 error.
7 replies