42 lines
985 B
PHP
42 lines
985 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasColor;
|
|
use Filament\Support\Contracts\HasIcon;
|
|
use Filament\Support\Contracts\HasLabel;
|
|
|
|
enum ProjektStatus: string implements HasColor, HasIcon, HasLabel
|
|
{
|
|
case TEST = 'test';
|
|
case ENTWURF = 'entwurf';
|
|
case ENFASSUNG = 'endfassung';
|
|
|
|
public function getLabel(): ?string
|
|
{
|
|
return match ($this) {
|
|
self::TEST => 'Test',
|
|
self::ENTWURF => 'Entwurf',
|
|
self::ENFASSUNG => 'Endfassung',
|
|
};
|
|
}
|
|
|
|
public function getColor(): string|array|null
|
|
{
|
|
return match ($this) {
|
|
self::TEST => 'gray',
|
|
self::ENTWURF => 'primary',
|
|
self::ENFASSUNG => 'success',
|
|
};
|
|
}
|
|
|
|
public function getIcon(): ?string
|
|
{
|
|
return match ($this) {
|
|
self::TEST => 'lucide-file-cog',
|
|
self::ENTWURF => 'lucide-file-pen',
|
|
self::ENFASSUNG => 'lucide-file-check',
|
|
};
|
|
}
|
|
}
|