base commit

This commit is contained in:
Mekan1206
2026-07-30 17:24:40 +05:00
commit a794dacd39
345 changed files with 29597 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum ApprovalStatus: string
{
case Pending = 'pending';
case Approved = 'approved';
case Rejected = 'rejected';
public function label(): string
{
return match ($this) {
self::Pending => 'Pending',
self::Approved => 'Approved',
self::Rejected => 'Rejected',
};
}
public function color(): string
{
return match ($this) {
self::Pending => 'warning',
self::Approved => 'success',
self::Rejected => 'danger',
};
}
public function icon(): string
{
return match ($this) {
self::Pending => 'heroicon-o-clock',
self::Approved => 'heroicon-o-check-badge',
self::Rejected => 'heroicon-o-x-mark',
};
}
}

43
app/Enums/BonusType.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum BonusType: string
{
case Performance = 'performance';
case Holiday = 'holiday';
case Retention = 'retention';
case Other = 'other';
public function label(): string
{
return match ($this) {
self::Performance => 'Performance',
self::Holiday => 'Holiday',
self::Retention => 'Retention',
self::Other => 'Other',
};
}
public function color(): string
{
return match ($this) {
self::Performance => 'success',
self::Holiday => 'primary',
self::Retention => 'info',
self::Other => 'gray',
};
}
public function icon(): string
{
return match ($this) {
self::Performance => 'heroicon-o-star',
self::Holiday => 'heroicon-o-gift',
self::Retention => 'heroicon-o-hand-raised',
self::Other => 'heroicon-o-banknotes',
};
}
}

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum DisciplinarySeverity: string
{
case Low = 'low';
case Medium = 'medium';
case High = 'high';
public function label(): string
{
return match ($this) {
self::Low => 'Low',
self::Medium => 'Medium',
self::High => 'High',
};
}
public function color(): string
{
return match ($this) {
self::Low => 'info',
self::Medium => 'warning',
self::High => 'danger',
};
}
public function icon(): string
{
return match ($this) {
self::Low => 'heroicon-o-information-circle',
self::Medium => 'heroicon-o-exclamation-triangle',
self::High => 'heroicon-o-shield-exclamation',
};
}
}

View File

@@ -0,0 +1,47 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum DocumentType: string
{
case Passport = 'passport';
case Contract = 'contract';
case MedicalCertificate = 'medical_certificate';
case EducationCertificate = 'education_certificate';
case Other = 'other';
public function label(): string
{
return match ($this) {
self::Passport => 'Passport',
self::Contract => 'Contract',
self::MedicalCertificate => 'Medical Certificate',
self::EducationCertificate => 'Education Certificate',
self::Other => 'Other',
};
}
public function color(): string
{
return match ($this) {
self::Passport => 'primary',
self::Contract => 'success',
self::MedicalCertificate => 'danger',
self::EducationCertificate => 'info',
self::Other => 'gray',
};
}
public function icon(): string
{
return match ($this) {
self::Passport => 'heroicon-o-identification',
self::Contract => 'heroicon-o-document-text',
self::MedicalCertificate => 'heroicon-o-heart',
self::EducationCertificate => 'heroicon-o-academic-cap',
self::Other => 'heroicon-o-folder',
};
}
}

View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum EmploymentStatus: string
{
case Active = 'active';
case Inactive = 'inactive';
case Terminated = 'terminated';
case OnLeave = 'on_leave';
public function label(): string
{
return match ($this) {
self::Active => 'Active',
self::Inactive => 'Inactive',
self::Terminated => 'Terminated',
self::OnLeave => 'On Leave',
};
}
public function color(): string
{
return match ($this) {
self::Active => 'success',
self::Inactive => 'gray',
self::Terminated => 'danger',
self::OnLeave => 'warning',
};
}
public function icon(): string
{
return match ($this) {
self::Active => 'heroicon-o-check-circle',
self::Inactive => 'heroicon-o-pause-circle',
self::Terminated => 'heroicon-o-x-circle',
self::OnLeave => 'heroicon-o-clock',
};
}
}

39
app/Enums/Gender.php Normal file
View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum Gender: string
{
case Male = 'male';
case Female = 'female';
case Other = 'other';
public function label(): string
{
return match ($this) {
self::Male => 'Male',
self::Female => 'Female',
self::Other => 'Other',
};
}
public function color(): string
{
return match ($this) {
self::Male => 'info',
self::Female => 'pink',
self::Other => 'gray',
};
}
public function icon(): string
{
return match ($this) {
self::Male => 'heroicon-o-user',
self::Female => 'heroicon-o-user',
self::Other => 'heroicon-o-users',
};
}
}

71
app/Enums/ImportType.php Normal file
View File

@@ -0,0 +1,71 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum ImportType: string
{
case Employees = 'employees';
case Vacations = 'vacations';
case Bonuses = 'bonuses';
case Reports = 'reports';
public function label(): string
{
return match ($this) {
self::Employees => 'Employees',
self::Vacations => 'Vacations',
self::Bonuses => 'Bonuses',
self::Reports => 'Disciplinary Reports',
};
}
/**
* @return array<string, string>
*/
public function fields(): array
{
return match ($this) {
self::Employees => [
'employee_number' => 'Employee Number',
'full_name' => 'Full Name',
'national_id' => 'National ID',
'gender' => 'Gender',
'birth_date' => 'Birth Date',
'phone' => 'Phone',
'address' => 'Address',
'department' => 'Department',
'position' => 'Position',
'shift' => 'Shift',
'employment_status' => 'Employment Status',
'hire_date' => 'Hire Date',
'notes' => 'Notes',
],
self::Vacations => [
'employee_number' => 'Employee Number',
'type' => 'Type',
'start_date' => 'Start Date',
'end_date' => 'End Date',
'return_date' => 'Return Date',
'days' => 'Days',
'status' => 'Status',
'reason' => 'Reason',
],
self::Bonuses => [
'employee_number' => 'Employee Number',
'bonus_date' => 'Bonus Date',
'bonus_type' => 'Bonus Type',
'amount' => 'Amount',
'reason' => 'Reason',
],
self::Reports => [
'employee_number' => 'Employee Number',
'report_date' => 'Report Date',
'title' => 'Title',
'description' => 'Description',
'severity' => 'Severity',
],
};
}
}

View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum VacationType: string
{
case Annual = 'annual';
case Marriage = 'marriage';
case Study = 'study';
case Other = 'other';
public function label(): string
{
return match ($this) {
self::Annual => 'Annual',
self::Marriage => 'Marriage',
self::Study => 'Study',
self::Other => 'Other',
};
}
public function color(): string
{
return match ($this) {
self::Annual => 'primary',
self::Marriage => 'pink',
self::Study => 'info',
self::Other => 'gray',
};
}
public function icon(): string
{
return match ($this) {
self::Annual => 'heroicon-o-sun',
self::Marriage => 'heroicon-o-heart',
self::Study => 'heroicon-o-academic-cap',
self::Other => 'heroicon-o-calendar-days',
};
}
}