Files
hr/app/Enums/DisciplinarySeverity.php
2026-07-30 17:24:40 +05:00

40 lines
831 B
PHP

<?php
declare(strict_types=1);
namespace App\Enums;
enum DisciplinarySeverity: string
{
case Low = 'low';
case Medium = 'medium';
case High = 'high';
public function label(): string
{
return match ($this) {
self::Low => 'Low',
self::Medium => 'Medium',
self::High => 'High',
};
}
public function color(): string
{
return match ($this) {
self::Low => 'info',
self::Medium => 'warning',
self::High => 'danger',
};
}
public function icon(): string
{
return match ($this) {
self::Low => 'heroicon-o-information-circle',
self::Medium => 'heroicon-o-exclamation-triangle',
self::High => 'heroicon-o-shield-exclamation',
};
}
}