Implement HasLabel interface in multiple enum classes, refactor label methods to improve localization consistency, and update default phone configuration in HR settings. Enhance employee form with phone number formatting and localization tests for enum options.
This commit is contained in:
@@ -4,13 +4,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum DisciplinarySeverity: string
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
enum DisciplinarySeverity: string implements HasLabel
|
||||
{
|
||||
case Low = 'low';
|
||||
case Medium = 'medium';
|
||||
case High = 'high';
|
||||
|
||||
public function label(): string
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Low => __('enums.disciplinary_severity.low'),
|
||||
@@ -19,6 +21,11 @@ enum DisciplinarySeverity: string
|
||||
};
|
||||
}
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return $this->getLabel();
|
||||
}
|
||||
|
||||
public function color(): string
|
||||
{
|
||||
return match ($this) {
|
||||
|
||||
Reference in New Issue
Block a user