Files
LarsandClaude Opus 5.5 799869c6a4 v0.11 U1: Kanalmanager mit eigener Webseite und neuen Prozessparametern
- Eigene Webseite als Kanal eigener Art (channels.kind = website), nur zur
  Konfiguration: Webseiten-Anfragen bleiben direkt (A1) ohne Kanalbezug;
  der Eintrag nimmt an Sync, Export, Überwachung und Sperraufgaben nicht teil
  (active()/Property::channels() nur Portale, Feed nur für Portale).
- Neue Einstellungen im bestehenden ProcessSetting: Klärungsreservierung
  automatisch/Freigabe (15/180 min, 0 = keine), Rückfragemodus,
  Erinnerungen, Folgefragen, Erinnerungsabstand, Linkgültigkeit,
  Anschrift im Webformular verlangen (Standard: nein).
- „Kanäle“ in der einfachen Ansicht: Webseite und Portale an einer Stelle,
  Verweis auf „Ihre Standards“; „Wirksame Einstellungen“ mit Spalte
  „Eigene Webseite“ und Herkunft „Webseite“.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:52:50 +01:00

81 lines
2.4 KiB
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;
use App\Filament\Pages\Dashboard;
use App\Filament\Pages\OccupancyCalendar;
use App\Filament\Pages\PricesAndOffers;
use App\Filament\Resources\BlockedPeriods\BlockedPeriodResource;
use App\Filament\Resources\Bookings\BookingResource;
use App\Filament\Resources\Channels\ChannelResource;
use App\Filament\Resources\Guests\GuestResource;
use Filament\Support\Contracts\HasDescription;
use Filament\Support\Contracts\HasLabel;
/**
* How much of the admin a user sees. It only shapes the menu – what a user may do is decided by the role.
*/
enum AdminMode: string implements HasDescription, HasLabel
{
case Simple = 'simple';
case Expert = 'expert';
/**
* Menu entries of the simple mode: the start page with everything to do, calendar, cases, guests, blocked periods
* and prices. Tasks, portal tasks and the mailbox are part of the start page's work list.
*
* @var list<class-string>
*/
public const SIMPLE_NAVIGATION = [
Dashboard::class,
OccupancyCalendar::class,
BookingResource::class,
GuestResource::class,
BlockedPeriodResource::class,
PricesAndOffers::class,
ChannelResource::class,
];
public function getLabel(): string
{
return match ($this) {
self::Simple => 'Einfache Ansicht',
self::Expert => 'Expertenansicht',
};
}
public function getDescription(): string
{
return match ($this) {
self::Simple => 'Das Tägliche: Start mit allem, was zu tun ist, Kalender, Vorgänge, Gäste, Sperrzeiten, Preise',
self::Expert => 'Alle Einstellungen: Preise, Angebote, Kalenderabgleich (iCal), Webseite, System',
};
}
/**
* Whether a resource or page appears in the menu in this mode.
*
* @param class-string $class
*/
public function shows(string $class): bool
{
return $this === self::Expert || in_array($class, self::SIMPLE_NAVIGATION, true);
}
/**
* Label of the user menu entry that switches to this mode.
*/
public function switchLabel(): string
{
return match ($this) {
self::Simple => 'Zur einfachen Ansicht wechseln',
self::Expert => 'Zur Expertenansicht wechseln',
};
}
public function other(): self
{
return $this === self::Simple ? self::Expert : self::Simple;
}
}