mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-17 22:04:44 +02:00

Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com> Co-authored-by: notCharles <charles@pelican.dev>
28 lines
611 B
PHP
28 lines
611 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasColor;
|
|
use Filament\Support\Contracts\HasLabel;
|
|
|
|
enum ScheduleStatus: string implements HasColor, HasLabel
|
|
{
|
|
case Inactive = 'inactive';
|
|
case Processing = 'processing';
|
|
case Active = 'active';
|
|
|
|
public function getColor(): string
|
|
{
|
|
return match ($this) {
|
|
self::Inactive => 'danger',
|
|
self::Processing => 'warning',
|
|
self::Active => 'success',
|
|
};
|
|
}
|
|
|
|
public function getLabel(): string
|
|
{
|
|
return trans('server/schedule.schedule_status.' . $this->value);
|
|
}
|
|
}
|