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
2026-08-02 21:19:46 +05:00
parent eed46157cd
commit e16402b23f
13 changed files with 102 additions and 26 deletions

View File

@@ -4,13 +4,15 @@ declare(strict_types=1);
namespace App\Enums;
enum Gender: string
use Filament\Support\Contracts\HasLabel;
enum Gender: string implements HasLabel
{
case Male = 'male';
case Female = 'female';
// case Other = 'other';
public function label(): string
public function getLabel(): string
{
return match ($this) {
self::Male => __('enums.gender.male'),
@@ -19,6 +21,11 @@ enum Gender: string
};
}
public function label(): string
{
return $this->getLabel();
}
public function color(): string
{
return match ($this) {