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:
Mekan1206
2026-08-02 21:06:37 +05:00
parent 28cbef8eb5
commit eed46157cd
25 changed files with 1175 additions and 51 deletions

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Exports;
use App\Models\Employee;
use App\Support\Countries;
use Illuminate\Database\Eloquent\Builder;
use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\WithHeadings;
@@ -39,7 +40,7 @@ class EmployeesExport implements FromQuery, WithHeadings, WithMapping
return [
'Employee Number',
'Full Name',
'National ID',
'Nationality',
'Gender',
'Birth Date',
'Phone',
@@ -63,7 +64,7 @@ class EmployeesExport implements FromQuery, WithHeadings, WithMapping
return [
$employee->employee_number,
$employee->full_name,
$employee->national_id,
Countries::name($employee->national_id) ?? $employee->national_id,
$employee->gender?->value,
$employee->birth_date?->toDateString(),
$employee->phone,