base commit
This commit is contained in:
commit
a794dacd39
345 files changed
+29597
No files matched your search
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum ApprovalStatus: string
|
||||
{
|
||||
case Pending = 'pending';
|
||||
case Approved = 'approved';
|
||||
case Rejected = 'rejected';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Pending => 'Pending',
|
||||
self::Approved => 'Approved',
|
||||
self::Rejected => 'Rejected',
|
||||
};
|
||||
}
|
||||
|
||||
public function color(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Pending => 'warning',
|
||||
self::Approved => 'success',
|
||||
self::Rejected => 'danger',
|
||||
};
|
||||
}
|
||||
|
||||
public function icon(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Pending => 'heroicon-o-clock',
|
||||
self::Approved => 'heroicon-o-check-badge',
|
||||
self::Rejected => 'heroicon-o-x-mark',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user