base commit
This commit is contained in:
43
app/Enums/BonusType.php
Normal file
43
app/Enums/BonusType.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum BonusType: string
|
||||
{
|
||||
case Performance = 'performance';
|
||||
case Holiday = 'holiday';
|
||||
case Retention = 'retention';
|
||||
case Other = 'other';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Performance => 'Performance',
|
||||
self::Holiday => 'Holiday',
|
||||
self::Retention => 'Retention',
|
||||
self::Other => 'Other',
|
||||
};
|
||||
}
|
||||
|
||||
public function color(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Performance => 'success',
|
||||
self::Holiday => 'primary',
|
||||
self::Retention => 'info',
|
||||
self::Other => 'gray',
|
||||
};
|
||||
}
|
||||
|
||||
public function icon(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Performance => 'heroicon-o-star',
|
||||
self::Holiday => 'heroicon-o-gift',
|
||||
self::Retention => 'heroicon-o-hand-raised',
|
||||
self::Other => 'heroicon-o-banknotes',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user