d2d.emegrendeles.hu/app/Enums/OverrideScope.php
2026-04-20 21:32:05 +02:00

29 lines
863 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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',
};
}
}