mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 18:16:55 +01:00 
			
		
		
		
	 d5d50d4150
			
		
	
	
		d5d50d4150
		
			
		
	
	
	
	
		
			
			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);
 | |
|     }
 | |
| }
 |