mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
- Added groups, where you can set bunch of items with identified unique keys to get the lowest price on group of products. ( think of it like building your own PC, you add multiple CPUs, and GPUs and the program will notify you when the combination reaches a desired price) - Added 2FA Support to the system (Optional) - Make Sidebar collapsable - Fix name is too short which results to not be saved - Fix a bug where product can be duplicated from amazon stores
41 lines
746 B
PHP
41 lines
746 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasLabel;
|
|
use Illuminate\Support\Arr;
|
|
|
|
enum StatusEnum : string implements HasLabel
|
|
{
|
|
case Published='p';
|
|
case Disabled='d';
|
|
case Silenced='s';
|
|
|
|
public static function names(): array
|
|
{
|
|
return array_column(self::cases(), 'name');
|
|
}
|
|
|
|
public static function values(): array
|
|
{
|
|
return array_column(self::cases(), 'value');
|
|
}
|
|
|
|
public static function to_array(): array
|
|
{
|
|
return array_combine(self::values(), self::names());
|
|
}
|
|
|
|
public static function ignored():array
|
|
{
|
|
return [
|
|
self::Disabled,
|
|
];
|
|
}
|
|
|
|
public function getLabel(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
}
|