Parthiban N
New Light Theme issue for Notifications
finally i found where i made a mistake, sorry for wasting your time and thanks for your cooperation. Actually i overload the filament app.css using PanelsRenderHook::HEAD_END with the default resources/css/app.css
25 replies
New Light Theme issue for Notifications
Filament ...............................................................................................................
Blade Icons ................................................................................................. NOT CACHED
Packages ............................................................... filament, forms, notifications, support, tables
Panel Components ............................................................................................ NOT CACHED
Version ....................................................................................................... v3.2.132
Views .................................................................................................... NOT PUBLISHED
Blade Icons ................................................................................................. NOT CACHED
Packages ............................................................... filament, forms, notifications, support, tables
Panel Components ............................................................................................ NOT CACHED
Version ....................................................................................................... v3.2.132
Views .................................................................................................... NOT PUBLISHED
25 replies
Table Toggle Column Issue in v3.2.131
<?php
namespace App\Enums;
use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasLabel;
enum StatusEnum: int implements HasLabel, HasColor
{
case Enable = 1;
case Disable = 0;
public function getLabel(): ?string {
return match ($this) {
self::Enable => 'Enabled',
self::Disable => 'Disabled',
};
}
public function getColor(): string | array | null {
return match ($this) {
self::Enable => 'success',
self::Disable => 'danger',
};
}
public function getAllValues() : array {
return array_column(self::cases(), 'value');
}
}
i am using this enum for the casting but it doesn't works
14 replies
Table Toggle Column Issue in v3.2.131
<?php
namespace App\Concerns\Component;
use App\Enums\StatusEnum;
use Filament\Tables\Columns;
use Filament\Forms\Components as FormComponents;
use Filament\Infolists\Components as InfolistComponents;
trait Status
{
protected static function statusToggleFormComponent() : FormComponents\Field {
return FormComponents\Toggle::make('status')
->label(('general.form_fields.status'))
->onColor('success')
->offColor('danger')
->default(true);
}
protected static function statusBadgeColumnComponent() : Columns\Column {
return Columns\BadgeColumn::make('status')
->sortable(false);
}
protected static function statusToggleColumnComponent(bool | \Closure $visibleCondition = true) : Columns\Column {
return Columns\ToggleColumn::make('status')
->sortable(false)
->onColor('success')
->offColor('danger')
->visible($visibleCondition)
->toggleable(isToggledHiddenByDefault: true)
->afterStateUpdated(fn() => \Helpers::toast(
title: ('general.success_message.status_update'),
color: 'success'
));
}
protected static function statusBadgeInfolistComponent() : InfolistComponents\Entry {
return InfolistComponents\TextEntry::make('status')
->label(__('general.info_fields.status'))
->badge()
->color(fn(int $state): string => StatusEnum::tryFrom($state)->getColor())
->formatStateUsing(fn(int $state): string => StatusEnum::tryFrom($state)->getLabel());
}
}
i am using trait's statusToggleColumnComponent method wherever i need status toggle column
14 replies