44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?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',
|
|
};
|
|
}
|
|
}
|