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:
Mekan1206 committed 2026-08-02 21:19:46 +05:00
1 parent eed46157cd
commit e16402b23f
13 files changed
+102 -26

No files matched your search

+9 -2
View File
@@ -4,14 +4,16 @@
namespace App\Enums;
enum EmploymentStatus: string
use Filament\Support\Contracts\HasLabel;
enum EmploymentStatus: string implements HasLabel
{
case Active = 'active';
case Inactive = 'inactive';
case Terminated = 'terminated';
case OnLeave = 'on_leave';
public function label(): string
public function getLabel(): string
{
return match ($this) {
self::Active => __('enums.employment_status.active'),
@@ -21,6 +23,11 @@ public function label(): string
};
}
public function label(): string
{
return $this->getLabel();
}
public function color(): string
{
return match ($this) {