35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasLabel;
|
|
|
|
/**
|
|
* What a message may cause (V2.1). No effect creates a case, a reservation, an offer or a booking.
|
|
*/
|
|
enum MessageEffect: string implements HasLabel
|
|
{
|
|
case AnswerInformation = 'answer_information';
|
|
case ContributeFacts = 'contribute_facts';
|
|
case ReportToCase = 'report_to_case';
|
|
case HandoffInquiry = 'handoff_inquiry';
|
|
case Review = 'review';
|
|
|
|
public function getLabel(): string
|
|
{
|
|
return match ($this) {
|
|
self::AnswerInformation => 'allgemeine Auskunft geben',
|
|
self::ContributeFacts => 'Angaben für den Vorgang vorschlagen',
|
|
self::ReportToCase => 'Aufgabe am Vorgang anlegen',
|
|
self::HandoffInquiry => 'auf den Anfrageweg verweisen',
|
|
self::Review => 'zur Klärung vorlegen',
|
|
};
|
|
}
|
|
|
|
/** Effects that act on an existing case and therefore need a verified assignment. */
|
|
public function needsCase(): bool
|
|
{
|
|
return $this === self::ContributeFacts || $this === self::ReportToCase;
|
|
}
|
|
}
|