mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
32 lines
683 B
PHP
32 lines
683 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasColor;
|
|
use Filament\Support\Contracts\HasLabel;
|
|
|
|
enum ProductSourceStatus: string implements HasColor, HasLabel
|
|
{
|
|
case Active = 'active';
|
|
case Inactive = 'inactive';
|
|
case Draft = 'draft';
|
|
|
|
public function getLabel(): string
|
|
{
|
|
return match ($this) {
|
|
self::Active => 'Active',
|
|
self::Inactive => 'Inactive',
|
|
self::Draft => 'Draft',
|
|
};
|
|
}
|
|
|
|
public function getColor(): string
|
|
{
|
|
return match ($this) {
|
|
self::Active => 'success',
|
|
self::Inactive => 'danger',
|
|
self::Draft => 'gray',
|
|
};
|
|
}
|
|
}
|