You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
topnotch_website/app/Enums/OrderAttributes.php

42 lines
1.2 KiB
PHP

<?php
namespace App\Enums;
use Filament\Support\Contracts\HasIcon;
use Filament\Support\Contracts\HasLabel;
enum OrderAttributes: string implements HasIcon, HasLabel
{
case new_art = 'New Art';
case repeat = 'Repeat';
case rush = 'Rush';
case event = 'Event';
case digitizing = 'Digitizing';
case garments = 'Garments';
case supplied_file = 'Customer Supplied File';
public function getLabel(): ?string
{
return $this->value;
}
// public function getColor(): string|array|null
// {
// return match ($this) {
// };
// }
public function getIcon(): ?string
{
return match ($this) {
self::new_art => 'heroicon-o-paint-brush',
self::repeat => 'heroicon-o-clipboard-document',
self::rush => 'heroicon-o-clock',
self::event => 'heroicon-o-users',
self::digitizing => 'heroicon-o-computer-desktop',
self::garments => 'heroicon-o-shopping-bag',
self::supplied_file => 'heroicon-o-arrow-down-tray',
};
}
}