Refactor employee management by implementing automatic employee number generation, updating national ID handling, and enhancing localization for gender and nationality fields across various resources. Adjust form components and validation logic to improve user experience and data integrity.
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Models\Department;
|
||||
use App\Models\Employee;
|
||||
use App\Models\Position;
|
||||
use App\Models\Shift;
|
||||
use App\Support\Countries;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
@@ -30,9 +31,9 @@ class EmployeeFactory extends Factory
|
||||
$gender = fake()->randomElement(Gender::cases());
|
||||
|
||||
return [
|
||||
'employee_number' => 'EMP-'.fake()->unique()->numerify('#####'),
|
||||
'employee_number' => '',
|
||||
'full_name' => fake()->name($gender === Gender::Female ? 'female' : 'male'),
|
||||
'national_id' => fake()->optional(0.8)->numerify('##########'),
|
||||
'national_id' => fake()->optional(0.8)->randomElement(Countries::codes()),
|
||||
'gender' => $gender,
|
||||
'birth_date' => $birthDate,
|
||||
'phone' => '+993 61 92 92 48',
|
||||
|
||||
Reference in New Issue
Block a user