projekte
This commit is contained in:
1 parent
0b1a1493b2
commit
527739b996
20 files changed
+546
No files matched your search
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Filament\Support\Contracts\HasColor;
|
||||
use Filament\Support\Contracts\HasIcon;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
enum ProkektStatus: 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',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user