29 lines
863 B
PHP
29 lines
863 B
PHP
<?php
|
||
|
||
namespace App\Enums;
|
||
|
||
enum OverrideScope: string
|
||
{
|
||
case General = 'general'; // Általános – adott beszállítóra, minden régióra és profitcenterre
|
||
case Region = 'region'; // Régió-specifikus – adott régióra vonatkozó felülbírálás
|
||
case ProfitCenter = 'profit_center'; // Profitcenter-specifikus – csak 1 konkrét profitcenterre
|
||
|
||
public function label(): string
|
||
{
|
||
return match($this) {
|
||
self::General => 'Általános (minden telephely)',
|
||
self::Region => 'Régió-specifikus',
|
||
self::ProfitCenter => 'Profitcenter-specifikus',
|
||
};
|
||
}
|
||
|
||
public function color(): string
|
||
{
|
||
return match($this) {
|
||
self::General => 'gray',
|
||
self::Region => 'warning',
|
||
self::ProfitCenter => 'info',
|
||
};
|
||
}
|
||
}
|