Oben im Seitenmenue waehlt man die Wohnung; Listen, neue Eintraege, Belegungsplan und Preise & Angebote folgen ihr. Ein geoeffneter Eintrag einer anderen Wohnung schaltet auf diese um. Galerie und Ersatz-Titelbild der Website zeigen nur Fotos der Wohnung des Bausteins und Fotos ohne Wohnung. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
1.7 KiB
PHP
58 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\FloorPlans;
|
|
|
|
use App\Filament\Concerns\FollowsAdminMode;
|
|
use App\Filament\Concerns\SelectsRecordProperty;
|
|
use App\Filament\Resources\FloorPlans\Pages\CreateFloorPlan;
|
|
use App\Filament\Resources\FloorPlans\Pages\EditFloorPlan;
|
|
use App\Filament\Resources\FloorPlans\Pages\ListFloorPlans;
|
|
use App\Filament\Resources\FloorPlans\Schemas\FloorPlanForm;
|
|
use App\Filament\Resources\FloorPlans\Tables\FloorPlansTable;
|
|
use App\Models\FloorPlan;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
/**
|
|
* Floor plan per apartment: picture from the website photos plus rooms drawn on it (section "Grundriss").
|
|
*/
|
|
class FloorPlanResource extends Resource
|
|
{
|
|
use FollowsAdminMode, SelectsRecordProperty;
|
|
|
|
protected static ?string $model = FloorPlan::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedMap;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Webseite';
|
|
|
|
protected static ?string $modelLabel = 'Grundriss';
|
|
|
|
protected static ?string $pluralModelLabel = 'Grundriss';
|
|
|
|
protected static ?int $navigationSort = 5;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return FloorPlanForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return FloorPlansTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListFloorPlans::route('/'),
|
|
'create' => CreateFloorPlan::route('/create'),
|
|
'edit' => EditFloorPlan::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|