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>
67 lines
2.0 KiB
PHP
67 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Channels;
|
|
|
|
use App\Filament\Concerns\FollowsAdminMode;
|
|
use App\Filament\Concerns\SelectsRecordProperty;
|
|
use App\Filament\Resources\Channels\Pages\ChannelRules;
|
|
use App\Filament\Resources\Channels\Pages\CreateChannel;
|
|
use App\Filament\Resources\Channels\Pages\EditChannel;
|
|
use App\Filament\Resources\Channels\Pages\ListChannels;
|
|
use App\Filament\Resources\Channels\Schemas\ChannelForm;
|
|
use App\Filament\Resources\Channels\Tables\ChannelsTable;
|
|
use App\Models\Channel;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use UnitEnum;
|
|
|
|
class ChannelResource extends Resource
|
|
{
|
|
use FollowsAdminMode, SelectsRecordProperty;
|
|
|
|
protected static ?string $model = Channel::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedArrowsRightLeft;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Vermietung';
|
|
|
|
protected static ?string $navigationLabel = 'Kalenderabgleich (iCal)';
|
|
|
|
protected static ?string $modelLabel = 'iCal-Verbindung';
|
|
|
|
protected static ?string $pluralModelLabel = 'Kalenderabgleich (iCal)';
|
|
|
|
protected static ?int $navigationSort = 4;
|
|
|
|
protected static ?string $recordTitleAttribute = 'name';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return ChannelForm::configure($schema, selectProperty: true);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return ChannelsTable::configure($table);
|
|
}
|
|
|
|
public static function canDelete(Model $record): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListChannels::route('/'),
|
|
'create' => CreateChannel::route('/create'),
|
|
'edit' => EditChannel::route('/{record}/edit'),
|
|
'rules' => ChannelRules::route('/{record}/rules'),
|
|
];
|
|
}
|
|
}
|