46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum PricelistFileLineStatusEnum: string
|
|
{
|
|
case ok = 'ok';
|
|
case warning = 'warning';
|
|
case error = 'error';
|
|
case new_product = 'new_product';
|
|
case updated = 'updated';
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::ok => 'rendben',
|
|
self::warning => 'figyelmeztetés',
|
|
self::error => 'hiba',
|
|
self::new_product => 'új termék',
|
|
self::updated => 'módosítás',
|
|
};
|
|
}
|
|
|
|
public function color(): string
|
|
{
|
|
return match ($this) {
|
|
self::ok => 'success',
|
|
self::warning => 'warning',
|
|
self::error => 'danger',
|
|
self::new_product => 'info',
|
|
self::updated => 'primary',
|
|
};
|
|
}
|
|
|
|
public function icon(): string
|
|
{
|
|
return match ($this) {
|
|
self::ok => 'heroicon-o-check-circle',
|
|
self::warning => 'heroicon-o-exclamation-triangle',
|
|
self::error => 'heroicon-o-x-circle',
|
|
self::new_product => 'heroicon-o-sparkles',
|
|
self::updated => 'heroicon-o-pencil-square',
|
|
};
|
|
}
|
|
}
|