This commit is contained in:
F4ilji
2026-04-09 09:09:17 +05:00
parent 169a2f5654
commit e986940680
14 changed files with 312 additions and 112 deletions
@@ -8,6 +8,7 @@ use Filament\Support\Contracts\HasColor;
enum PostStatus: string implements HasLabel, HasColor
{
case DRAFT = 'draft';
case VERIFICATION = 'verification';
case PUBLISHED = 'published';
case REJECTED = 'rejected';
@@ -15,6 +16,7 @@ enum PostStatus: string implements HasLabel, HasColor
public function getLabel(): ?string
{
return match ($this) {
self::DRAFT => 'Черновик',
self::VERIFICATION => 'На рассмотрении',
self::PUBLISHED => 'Опубликовано',
self::REJECTED => 'Отклонено',
@@ -24,6 +26,7 @@ enum PostStatus: string implements HasLabel, HasColor
public function getColor(): string|array|null
{
return match ($this) {
self::DRAFT => 'gray',
self::VERIFICATION => 'warning',
self::PUBLISHED => 'success',
self::REJECTED => 'gray',