base commit
This commit is contained in:
commit
a794dacd39
345 files changed
+29597
No files matched your search
@@ -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',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user