Files
hr/app/Enums/VacationType.php
2026-07-30 17:24:40 +05:00

44 lines
973 B
PHP

<?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',
};
}
}