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,12 +4,12 @@ namespace App\Filament\Resources\Employees\Schemas;
use App\Enums\EmploymentStatus;
use App\Enums\Gender;
use Filament\Forms\Components\TextInput;
use Filament\Support\RawJs;
use App\Filament\Support\HrForm;
use App\Support\Countries;
use Filament\Forms\Components\DatePicker;
use App\Support\Countries;use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab;
use Filament\Schemas\Schema;
@@ -59,9 +59,12 @@ class EmployeeForm
TextInput::make('phone')
->label(__('hr.fields.phone'))
->tel()
->default(config('hr.default_phone'))
->prefix('+993')
->mask(RawJs::make(<<<'JS'
'99 99-99-99'
JS))
->required(),
Textarea::make('address')
->label(__('hr.fields.address'))
->rows(3)