Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m38s
- Buchung erfassen: Buchungsweg Portal (Referenz, Portalpreis, ohne Kontaktdaten), Prozess bestaetigen/Vertrag sofort/nur erfassen - Buchungsakte: Kontaktdaten eintragen (automatisch oder manuell weiter), Gast um Kontaktdaten bitten, Status von Hand aendern, Archivieren - Liste: Filter Kanal, Anreisezeitraum, Kontaktdaten fehlen; Spalten ausblendbar; Archiv - Klaerung: verstaendlichere Texte, eigenstaendige Belegung mit Kanal gilt als geklaert (Gitea #4) - Akte per Button aus Liste und Belegungsplan erreichbar - Menue: Gruppen Verwaltung (Tagesgeschaeft) und Einrichtung (Konfiguration), einfache Ansicht auf 8 Punkte Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
82 lines
2.5 KiB
PHP
82 lines
2.5 KiB
PHP
<?php
|
||
|
||
namespace App\Enums;
|
||
|
||
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\BookingTasks\BookingTaskResource;
|
||
use App\Filament\Resources\ChannelTasks\ChannelTaskResource;
|
||
use App\Filament\Resources\Guests\GuestResource;
|
||
use App\Filament\Resources\InboxMessages\InboxMessageResource;
|
||
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 few things needed every day: calendar, bookings with their file, tasks, mailbox, guests and prices.
|
||
*
|
||
* @var list<class-string>
|
||
*/
|
||
public const SIMPLE_NAVIGATION = [
|
||
OccupancyCalendar::class,
|
||
BookingResource::class,
|
||
BookingTaskResource::class,
|
||
ChannelTaskResource::class,
|
||
InboxMessageResource::class,
|
||
GuestResource::class,
|
||
BlockedPeriodResource::class,
|
||
PricesAndOffers::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: Postfach, Anfragen, Buchungen und Verträge, Sperrzeiten, Preise & Angebote, Gäste, Kalenderabgleich (iCal), Portal-Aufgaben, Bewertungen, Fotos',
|
||
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;
|
||
}
|
||
}
|