Files
hr/app/Enums/VacationType.php
2026-07-31 18:08:08 +05:00

44 lines
1.0 KiB
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 => __('enums.vacation_type.annual'),
self::Marriage => __('enums.vacation_type.marriage'),
self::Study => __('enums.vacation_type.study'),
self::Other => __('enums.vacation_type.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',
};
}
}