Files
fewo-stommer/app/Filament/Resources/Properties/PropertyResource.php
T
Lars StommerandClaude Opus 5.5 82698f8eda Admin accounts with simple/expert mode, blocked periods list, brand assets, decisions
- 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>
2026-10-22 21:08:09 +02:00

70 lines
2.2 KiB
PHP

<?php
namespace App\Filament\Resources\Properties;
use App\Filament\Concerns\FollowsAdminMode;
use App\Filament\Resources\Properties\Pages\CreateProperty;
use App\Filament\Resources\Properties\Pages\EditProperty;
use App\Filament\Resources\Properties\Pages\ListProperties;
use App\Filament\Resources\Properties\RelationManagers\BlockedPeriodsRelationManager;
use App\Filament\Resources\Properties\RelationManagers\ChannelsRelationManager;
use App\Filament\Resources\Properties\RelationManagers\ExtrasRelationManager;
use App\Filament\Resources\Properties\RelationManagers\SeasonsRelationManager;
use App\Filament\Resources\Properties\RelationManagers\SpecialOffersRelationManager;
use App\Filament\Resources\Properties\Schemas\PropertyForm;
use App\Filament\Resources\Properties\Tables\PropertiesTable;
use App\Models\Property;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;
class PropertyResource extends Resource
{
use FollowsAdminMode;
protected static ?string $model = Property::class;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedHomeModern;
protected static string|UnitEnum|null $navigationGroup = 'Vermietung';
protected static ?string $modelLabel = 'Wohnung';
protected static ?string $pluralModelLabel = 'Wohnungen';
protected static ?string $recordTitleAttribute = 'name';
public static function form(Schema $schema): Schema
{
return PropertyForm::configure($schema);
}
public static function table(Table $table): Table
{
return PropertiesTable::configure($table);
}
public static function getRelations(): array
{
return [
SeasonsRelationManager::class,
SpecialOffersRelationManager::class,
ExtrasRelationManager::class,
BlockedPeriodsRelationManager::class,
ChannelsRelationManager::class,
];
}
public static function getPages(): array
{
return [
'index' => ListProperties::route('/'),
'create' => CreateProperty::route('/create'),
'edit' => EditProperty::route('/{record}/edit'),
];
}
}