- Per-user admin mode (simple: bookings/contracts, blocked periods, guests, portal tasks, reviews; expert: everything the role allows), user menu switch, FollowsAdminMode on all resources/pages (guarded by a test); roles keep deciding permissions. - Users list shows mode and 2FA; admins can reset another user's 2FA. - New "Sperrzeiten" list for all apartments (manual blocks editable, portal blocks read-only). - styles/final: clean hand-built SVG mark, logo, favicon (dark-mode aware), 4 icons, wave divider, plus PNG/WebP for mail/PDF/touch icon; colours via --brand-* variables. - Decisions recorded in KONZEPT §6a/6b (booking path 1 via offer + guest acceptance, direct booking later; tourist tax by Ferienservice Balu); agent documents added and marked as analysis with assumptions; styles excluded from the deploy package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
1.5 KiB
PHP
61 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Sites;
|
|
|
|
use App\Filament\Concerns\FollowsAdminMode;
|
|
use App\Filament\Resources\Sites\Pages\CreateSite;
|
|
use App\Filament\Resources\Sites\Pages\EditSite;
|
|
use App\Filament\Resources\Sites\Pages\ListSites;
|
|
use App\Filament\Resources\Sites\Schemas\SiteForm;
|
|
use App\Filament\Resources\Sites\Tables\SitesTable;
|
|
use App\Models\Site;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
class SiteResource extends Resource
|
|
{
|
|
use FollowsAdminMode;
|
|
|
|
protected static ?string $model = Site::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedGlobeAlt;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'System';
|
|
|
|
protected static ?string $modelLabel = 'Website';
|
|
|
|
protected static ?string $pluralModelLabel = 'Websites';
|
|
|
|
protected static ?int $navigationSort = 2;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return SiteForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return SitesTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListSites::route('/'),
|
|
'create' => CreateSite::route('/create'),
|
|
'edit' => EditSite::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|