base commit
This commit is contained in:
47
app/Enums/DocumentType.php
Normal file
47
app/Enums/DocumentType.php
Normal 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',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user